tyfulcrum
V2EX  ›  问与答

请问 irb 有没有办法输出的时候 pretty-print?

  •  
  •   tyfulcrum · Jul 10, 2016 · 2285 views
    This topic created in 3594 days ago, the information mentioned may be changed or developed.

    最近在看 Understanding Computation ,书中展示的 irb 输出都是 pretty-print 的:

    http://imgur.com/FYS6Jdg

    然而我自己的 irb 输出挤成一坨:

    http://imgur.com/heVAdEv

    Google 了一下「 irb pretty print 」没找到类似的东西(结果都是 pretty-print array 或者 json 的),请问有什么办法么?

    4 replies    2016-07-10 09:03:01 +08:00
    tyfulcrum
        1
    tyfulcrum  
    OP
       Jul 10, 2016


    不好意思贴错链接了 = =
    shyling
        2
    shyling  
       Jul 10, 2016 via Android
    就我所知 irb 好像木有高亮
    skydiver
        3
    skydiver  
       Jul 10, 2016 via iPad   ❤️ 1
    试试 pry
    LiamHu
        4
    LiamHu  
       Jul 10, 2016 via iPhone   ❤️ 1
    awesome_print?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3589 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 10:40 · PVG 18:40 · LAX 03:40 · JFK 06:40
    ♥ Do have faith in what you're doing.