Where can I find an actively developed lint tool for Ruby?

后端 未结 9 953
别跟我提以往
别跟我提以往 2020-12-12 19:27

Most of the code I write is in Ruby, and every once in a while, I make some typo which only gets caught after a while. This is irritating when I have my scripts running long

9条回答
  •  甜味超标
    2020-12-12 20:12

    avdi@lazarus:~$ irb
    >> a = 20
    => 20
    >> b = 30
    => 30
    >> puts c
    NameError: undefined local variable or method `c' for main:Object
            from (irb):3
    >>
    

    There ya go, the tool is called "IRB". Do I get the bounty?

    I'm only half joking. I wrote this second answer to hopefully drive home the point that in Ruby, if you want to know that something is defined or not, you have to run the code.

提交回复
热议问题