How to suppress the output of return value in IRB/Rails Console?

后端 未结 4 1869
别那么骄傲
别那么骄傲 2020-12-23 20:29

An example is if I go into IRB and do the following:

jruby-1.6.7 :026 > puts [1,2,3,4,5]
1
2
3
4
5
=> nil 

Is there anyway to suppres

4条回答
  •  半阙折子戏
    2020-12-23 21:02

    From @Tallboy dead link

    To suppress the return value in Rails console, enter
    conf.return_format = ""

    Default (Print the return value)
    conf.return_format = "=> %s\n"

提交回复
热议问题