Skip to content

Instantly share code, notes, and snippets.

@Evshved
Created March 31, 2019 20:00
Show Gist options
  • Save Evshved/743f76add9344b0d610d4b4ec9865490 to your computer and use it in GitHub Desktop.
Save Evshved/743f76add9344b0d610d4b4ec9865490 to your computer and use it in GitHub Desktop.
[[{"0":[{"type":"bad","value":"\n\nclass Foo\n\n private def bar; end\n private def baz; end\n\nend\n\n"},{"type":"good","value":"\n\nclass Foo\n\n private\n\n def bar; end\n def baz; end\n\nend\n"}]}],[{"1":[{"type":"bad","value":"\n\nclass Foo\n\n private\n\n def bar; end\n def baz; end\n\nend\n\n"},{"type":"good","value":"\n\nclass Foo\n\n private def bar; end\n private def baz; end\n\nend\n"}]}],[{"2":[{"type":"bad","value":"\nalias_method :bar, :foo\nalias :bar :foo\n\n"},{"type":"good","value":"\nalias bar foo\n"}]}],[{"3":[{"type":"bad","value":"\nalias :bar :foo\nalias bar foo\n\n"},{"type":"good","value":"\nalias_method :bar, :foo\n"}]}],[{"4":[{"type":"bad","value":"\nfoo.save and return\n\n"},{"type":"bad","value":"\nif foo and bar\nend\n\n"},{"type":"good","value":"\nfoo.save && return\n\n"},{"type":"good","value":"\nif foo && bar\nend\n"}]}],[{"5":[{"type":"bad","value":"\nif foo and bar\nend\n\n"},{"type":"good","value":"\nfoo.save && return\n\n"},{"type":"good","value":"\nfoo.save and return\n\n"},{"type":"good","value":"\nif foo && bar\nend\n"}]}],[{"6":[{"type":"bad","value":"\n%w(foo bar baz) * \",\"\n\n"},{"type":"good","value":"\n%w(foo bar baz).join(\",\")\n"}]}],[{"7":[{"type":"bad","value":"\nTranslates from English to 日本語。\n\n"},{"type":"good","value":"\nTranslates from English to Japanese\n"}]}],[{"8":[{"type":"bad","value":" - creates a single attribute accessor (deprecated in Ruby 1.9)\nattr :something, true\nattr :one, :two, :three # behaves as attr_reader\n\n"},{"type":"good","value":"\nattr_accessor :something\nattr_reader :one, :two, :three\n"}]}],[{"9":[{"type":"bad","value":"\nf = File.open('file')\n\n"},{"type":"good","value":"\nFile.open('file') do |f|\n ...\nend\n"}]}],[{"10":[{"type":"bad","value":"\n%Q(He said: \"#{greeting}\")\n%q{She said: 'Hi'}\n\n"},{"type":"good","value":"\n%(He said: \"#{greeting}\")\n%{She said: 'Hi'}\n"},{"type":"bad","value":" said: \"#{greeting}\")\n%{She said: 'Hi'}\n"},{"type":"bad","value":": \"#{greeting}\")\n%{She said: 'Hi'}\n"},{"type":"bad","value":"greeting}\")\n%{She said: 'Hi'}\n"}]}],[{"11":[{"type":"bad","value":"\n%|He said: \"#{greeting}\"|\n%/She said: 'Hi'/\n\n"},{"type":"good","value":"\n%Q|He said: \"#{greeting}\"|\n%q/She said: 'Hi'/\n"},{"type":"bad","value":"e said: \"#{greeting}\"|\n%q/She said: 'Hi'/\n"},{"type":"bad","value":"d: \"#{greeting}\"|\n%q/She said: 'Hi'/\n"},{"type":"bad","value":"{greeting}\"|\n%q/She said: 'Hi'/\n"}]}],[{"12":[{"type":"bad","value":" - single line block\nitems.each do |item| item / 5 end\n\n"},{"type":"good","value":" - single line block\nitems.each { |item| item / 5 }\n\n"},{"type":"bad","value":" - multi-line block\nthings.map { |thing|\n something = thing.some_method\n process(something)\n}\n\n"},{"type":"good","value":" - multi-line block\nthings.map do |thing|\n something = thing.some_method\n process(something)\nend\n"}]}],[{"13":[{"type":"bad","value":"\nfoo = map do |x|\n x\nend\nputs (map do |x|\n x\nend)\n\n"},{"type":"good","value":"\nmap do |x|\n x\nend\n\n"},{"type":"bad","value":"\neach { |x|\n x\n}\n\n"},{"type":"good","value":"\nfoo = map { |x|\n x\n}\nmap { |x|\n x\n}.inspect\n\n\n"},{"type":"bad","value":"\ncollection.each { |element| puts element }\n\n"},{"type":"good","value":"\ncollection.each do |element| puts element end\n\n"},{"type":"good","value":"\ncollection.each { |element| puts element }\n\n"}]}],[{"14":[{"type":"bad","value":"\nwords.each do |word|\n word.flip.flop\nend.join(\"-\")\n\n"},{"type":"good","value":"\nwords.each { |word|\n word.flip.flop\n}.join(\"-\")\n"}]}],[{"15":[{"type":"bad","value":"\nsome_method(x, y, a: 1, b: 2)\n\n"},{"type":"good","value":"\nsome_method(x, y, {a: 1, b: 2})\n"}]}],[{"16":[{"type":"bad","value":"\nsome_method(x, y, {a: 1, b: 2})\n\n"},{"type":"good","value":"\nsome_method(x, y, a: 1, b: 2)\n"}]}],[{"17":[{"type":"bad","value":"\nsome_method(x, y, {a: 1, b: 2})\nsome_method(x, y, {a: 1, b: 2}, a: 1, b: 2)\n\n"},{"type":"good","value":"\nsome_method(x, y, a: 1, b: 2)\nsome_method(x, y, {a: 1, b: 2}, {a: 1, b: 2})\n"}]}],[{"18":[{"type":"bad","value":"\nArray === something\n(1..100) === 7\n/something/ === some_string\n\n"},{"type":"good","value":"\nsomething.is_a?(Array)\n(1..100).include?(7)\nsome_string =~ /something/\n"}]}],[{"19":[{"type":"bad","value":"\n?x\n\n"},{"type":"good","value":"\n'x'\n\n"},{"type":"good","value":"\n?\\C-\\M-d\n"}]}],[{"20":[{"type":"good","value":"\nclass Foo\n class Bar\n end\nend\n"}]}],[{"21":[{"type":"good","value":"\nclass Foo::Bar\nend\n"}]}],[{"22":[{"type":"bad","value":"\nvar.kind_of?(Date)\nvar.kind_of?(Integer)\n\n"},{"type":"good","value":"\nvar.is_a?(Date)\nvar.is_a?(Integer)\n"}]}],[{"23":[{"type":"bad","value":"\nvar.is_a?(Time)\nvar.is_a?(String)\n\n"},{"type":"good","value":"\nvar.kind_of?(Time)\nvar.kind_of?(String)\n"}]}],[{"24":[{"type":"bad","value":"\nclass A\n @@test = 10\nend\n\n"},{"type":"good","value":"\nclass A\n @test = 10\nend\n\nclass A\n def test\n @@test\n end\nend\n"}]}],[{"25":[{"type":"bad","value":"\nitems.collect\nitems.collect!\nitems.inject\nitems.detect\nitems.find_all\n\n"},{"type":"good","value":"\nitems.map\nitems.map!\nitems.reduce\nitems.find\nitems.select\n"}]}],[{"26":[{"type":"bad","value":"\nclass Foo\n def self::bar\n end\nend\n\n"},{"type":"good","value":"\nclass Foo\n def self.bar\n end\nend\n"}]}],[{"27":[{"type":"bad","value":"\nfolders = %x(find . -type d).split\n\n"},{"type":"bad","value":"\n%x(\n ln -s foo.example.yml foo.example\n ln -s bar.example.yml bar.example\n)\n\n"},{"type":"good","value":"\nfolders = `find . -type d`.split\n\n"},{"type":"good","value":"\n`\n ln -s foo.example.yml foo.example\n ln -s bar.example.yml bar.example\n`\n"}]}],[{"28":[{"type":"bad","value":"\nfolders = %x(find . -type d).split\n\n"},{"type":"bad","value":"\n`\n ln -s foo.example.yml foo.example\n ln -s bar.example.yml bar.example\n`\n\n"},{"type":"good","value":"\nfolders = `find . -type d`.split\n\n"},{"type":"good","value":"\n%x(\n ln -s foo.example.yml foo.example\n ln -s bar.example.yml bar.example\n)\n"}]}],[{"29":[{"type":"bad","value":"\nfolders = `find . -type d`.split\n\n"},{"type":"bad","value":"\n`\n ln -s foo.example.yml foo.example\n ln -s bar.example.yml bar.example\n`\n\n"},{"type":"good","value":"\nfolders = %x(find . -type d).split\n\n"},{"type":"good","value":"\n%x(\n ln -s foo.example.yml foo.example\n ln -s bar.example.yml bar.example\n)\n"}]}],[{"30":[{"type":"bad","value":"\n`echo \\`ls\\``\n\n"},{"type":"good","value":"\n%x(echo `ls`)\n"}]}],[{"31":[{"type":"good","value":"\n`echo \\`ls\\``\n"}]}],[{"32":[{"type":"bad","value":"\nif condition\n statement\nend # end if\n\n"},{"type":"bad","value":"\nclass X # comment\n statement\nend\n\n"},{"type":"bad","value":"\ndef x; end # comment\n\n"},{"type":"good","value":"\nif condition\n statement\nend\n\n"},{"type":"good","value":"\nclass X # :nodoc:\n y\nend\n"},{"type":"bad","value":"s X # :nodoc:\n y\nend\n"},{"type":"bad","value":" :nodoc:\n y\nend\n"}]}],[{"33":[{"type":"bad","value":"\nif foo\n bar = 1\nelse\n bar = 2\nend\n\ncase foo\nwhen 'a'\n bar += 1\nelse\n bar += 2\nend\n\nif foo\n some_method\n bar = 1\nelse\n some_other_method\n bar = 2\nend\n\n"},{"type":"good","value":"\nbar = if foo\n 1\n else\n 2\n end\n\nbar += case foo\n when 'a'\n 1\n else\n 2\n end\n\nbar << if foo\n some_method\n 1\n else\n some_other_method\n 2\n end\n"}]}],[{"34":[{"type":"bad","value":"\nbar = if foo\n 1\n else\n 2\n end\n\nbar += case foo\n when 'a'\n 1\n else\n 2\n end\n\nbar << if foo\n some_method\n 1\n else\n some_other_method\n 2\n end\n\n"},{"type":"good","value":"\nif foo\n bar = 1\nelse\n bar = 2\nend\n\ncase foo\nwhen 'a'\n bar += 1\nelse\n bar += 2\nend\n\nif foo\n some_method\n bar = 1\nelse\n some_other_method\n bar = 2\nend\n"}]}],[{"35":[{"type":"bad","value":"\nclass Foo\n BAR = 42\n BAZ = 43\nend\n\n"},{"type":"good","value":"\nclass Foo\n BAR = 42\n private_constant :BAR\n\n BAZ = 43\n public_constant :BAZ\nend\n"}]}],[{"36":[{"type":"bad","value":" - coerces to `DateTime`\nsomething.to_datetime\n\n"},{"type":"good","value":" - coerces to `Time`\nsomething.to_time\n"}]}],[{"37":[{"type":"good","value":"\nsomething.to_datetime\n\n"},{"type":"good","value":"\nsomething.to_time\n"}]}],[{"38":[{"type":"bad","value":"\npath = File.expand_path(File.dirname(__FILE__))\n\n"},{"type":"bad","value":"\npath = File.dirname(File.realpath(__FILE__))\n\n"},{"type":"good","value":"\npath = __dir__\n"}]}],[{"39":[{"type":"bad","value":"\nclass Person\n # ...\nend\n\n"},{"type":"good","value":"\nclass Person\n # ...\nend\n"},{"type":"bad","value":"s Person\n # ...\nend\n"},{"type":"bad","value":"son\n # ...\nend\n"},{"type":"bad","value":" # ...\nend\n"},{"type":"bad","value":".\nend\n"}]}],[{"40":[{"type":"bad","value":"\n\nclass Foo\n def bar\n puts baz\n end\nend\n\nmodule Foo\n def bar\n puts baz\n end\nend\n\ndef foo.bar\n puts baz\nend\n\n"},{"type":"good","value":"\n\nclass Foo\n def bar\n puts baz\n end\nend\n\nmodule Foo\n def bar\n puts baz\n end\nend\n\ndef foo.bar\n puts baz\nend\n"}]}],[{"41":[{"type":"bad","value":"\n!!something\n\n"},{"type":"good","value":"\n!something.nil?\n"}]}],[{"42":[{"type":"bad","value":"\n(1..5).each { }\n\n"},{"type":"good","value":"\n5.times { }\n"}]}],[{"43":[{"type":"bad","value":"\n(0...10).each {}\n\n"},{"type":"good","value":"\n10.times {}\n"}]}],[{"44":[{"type":"bad","value":"\n[1, 2].inject({}) { |a, e| a[e] = e; a }\n\n"},{"type":"good","value":"\n[1, 2].each_with_object({}) { |e, a| a[e] = e }\n"}]}],[{"45":[{"type":"bad","value":"\na do ||\n do_something\nend\n\n"},{"type":"bad","value":"\na { || do_something }\n\n"},{"type":"good","value":"\na do\nend\n\n"},{"type":"good","value":"\na { do_something }\n"}]}],[{"46":[{"type":"bad","value":":\ncase\nwhen x == 0\n puts 'x is 0'\nwhen y == 0\n puts 'y is 0'\nelse\n puts 'neither is 0'\nend\n\n"},{"type":"good","value":":\nif x == 0\n puts 'x is 0'\nelsif y == 0\n puts 'y is 0'\nelse\n puts 'neither is 0'\nend\n\n"},{"type":"good","value":":\ncase n\nwhen 0\n puts 'zero'\nwhen 1\n puts 'one'\nelse\n puts 'more'\nend\n"}]}],[{"47":[{"type":"bad","value":"\nif condition\n statement\nelse\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nelse\n nil\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nelse\n statement\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nend\n"}]}],[{"48":[{"type":"bad","value":"\nif condition\n statement\nelse\n nil\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nelse\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nelse\n statement\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nend\n"}]}],[{"49":[{"type":"bad","value":"\nif condition\n statement\nelse\n nil\nend\n\n"},{"type":"bad","value":"\nif condition\n statement\nelse\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nelse\n statement\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nend\n"}]}],[{"50":[{"type":"bad","value":"\n-> () { do_something }\n\n"},{"type":"good","value":"\n-> { do_something }\n\n"},{"type":"good","value":"\n-> (arg) { do_something(arg) }\n"}]}],[{"51":[{"type":"bad","value":"\na = Array.new\nh = Hash.new\ns = String.new\n\n"},{"type":"good","value":"\na = []\nh = {}\ns = ''\n"}]}],[{"52":[{"type":"bad","value":"\ndef foo(bar)\nend\n\ndef self.foo(bar)\nend\n\n"},{"type":"good","value":"\ndef foo(bar); end\n\ndef foo(bar)\n # baz\nend\n\ndef self.foo(bar); end\n"},{"type":"bad","value":"foo(bar); end\n\ndef foo(bar)\n # baz\nend\n\ndef self.foo(bar); end\n"},{"type":"bad","value":"ar); end\n\ndef foo(bar)\n # baz\nend\n\ndef self.foo(bar); end\n"},{"type":"bad","value":"end\n\ndef foo(bar)\n # baz\nend\n\ndef self.foo(bar); end\n"},{"type":"bad","value":"def foo(bar)\n # baz\nend\n\ndef self.foo(bar); end\n"},{"type":"bad","value":"oo(bar)\n # baz\nend\n\ndef self.foo(bar); end\n"},{"type":"bad","value":"r)\n # baz\nend\n\ndef self.foo(bar); end\n"},{"type":"bad","value":"# baz\nend\n\ndef self.foo(bar); end\n"},{"type":"bad","value":"\nend\n\ndef self.foo(bar); end\n"}]}],[{"53":[{"type":"bad","value":"\ndef foo(bar); end\n\ndef self.foo(bar); end\n\n"},{"type":"good","value":"\ndef foo(bar)\nend\n\ndef self.foo(bar)\nend\n"}]}],[{"54":[{"type":"bad","value":"\n# encoding: UTF-8\n# coding: UTF-8\n# -*- coding: UTF-8 -*-\n"},{"type":"bad","value":"coding: UTF-8\n# coding: UTF-8\n# -*- coding: UTF-8 -*-\n"},{"type":"bad","value":"g: UTF-8\n# coding: UTF-8\n# -*- coding: UTF-8 -*-\n"},{"type":"bad","value":"F-8\n# coding: UTF-8\n# -*- coding: UTF-8 -*-\n"},{"type":"bad","value":" coding: UTF-8\n# -*- coding: UTF-8 -*-\n"},{"type":"bad","value":"ng: UTF-8\n# -*- coding: UTF-8 -*-\n"},{"type":"bad","value":"TF-8\n# -*- coding: UTF-8 -*-\n"},{"type":"bad","value":"# -*- coding: UTF-8 -*-\n"},{"type":"bad","value":" coding: UTF-8 -*-\n"}]}],[{"55":[{"type":"bad","value":"\nEND { puts 'Goodbye!' }\n\n"},{"type":"good","value":"\nat_exit { puts 'Goodbye!' }\n"}]}],[{"56":[{"type":"bad","value":"\neval <<-RUBY\n def do_something\n end\nRUBY\n\n"},{"type":"bad","value":"\nC.class_eval <<-RUBY\n def do_something\n end\nRUBY\n\n"},{"type":"good","value":"\neval <<-RUBY, binding, __FILE__, __LINE__ + 1\n def do_something\n end\nRUBY\n\n"},{"type":"good","value":"\nC.class_eval <<-RUBY, __FILE__, __LINE__ + 1\n def do_something\n end\nRUBY\n"}]}],[{"57":[{"type":"bad","value":"\nif x % 2 == 0\nend\n\n"},{"type":"good","value":"\nif x.even?\nend\n"}]}],[{"58":[{"type":"bad","value":"\nFile.expand_path('..', __FILE__)\n\n"},{"type":"good","value":"\nFile.expand_path(__dir__)\n\n"},{"type":"bad","value":"\nFile.expand_path('../..', __FILE__)\n\n"},{"type":"good","value":"\nFile.expand_path('..', __dir__)\n\n"},{"type":"bad","value":"\nFile.expand_path('.', __FILE__)\n\n"},{"type":"good","value":"\nFile.expand_path(__FILE__)\n\n"},{"type":"bad","value":"\nPathname(__FILE__).parent.expand_path\n\n"},{"type":"good","value":"\nPathname(__dir__).expand_path\n\n"},{"type":"bad","value":"\nPathname.new(__FILE__).parent.expand_path\n\n"},{"type":"good","value":"\nPathname.new(__dir__).expand_path\n"}]}],[{"59":[{"type":"bad","value":"\ndef foo\n for n in [1, 2, 3] do\n puts n\n end\nend\n\n"},{"type":"good","value":"\ndef foo\n [1, 2, 3].each do |n|\n puts n\n end\nend\n"}]}],[{"60":[{"type":"bad","value":"\ndef foo\n [1, 2, 3].each do |n|\n puts n\n end\nend\n\n"},{"type":"good","value":"\ndef foo\n for n in [1, 2, 3] do\n puts n\n end\nend\n"}]}],[{"61":[{"type":"bad","value":"\nputs sprintf('%10s', 'hoge')\nputs '%10s' % 'hoge'\n\n"},{"type":"good","value":"\nputs format('%10s', 'hoge')\n"}]}],[{"62":[{"type":"bad","value":"\nputs format('%10s', 'hoge')\nputs '%10s' % 'hoge'\n\n"},{"type":"good","value":"\nputs sprintf('%10s', 'hoge')\n"}]}],[{"63":[{"type":"bad","value":"\nputs format('%10s', 'hoge')\nputs sprintf('%10s', 'hoge')\n\n"},{"type":"good","value":"\nputs '%10s' % 'hoge'\n"}]}],[{"64":[{"type":"bad","value":"\nformat('%{greeting}', greeting: 'Hello')\nformat('%s', 'Hello')\n\n"},{"type":"good","value":"\nformat('%<greeting>s', greeting: 'Hello')\n"}]}],[{"65":[{"type":"bad","value":"\nformat('%<greeting>s', greeting: 'Hello')\nformat('%s', 'Hello')\n\n"},{"type":"good","value":"\nformat('%{greeting}', greeting: 'Hello')\n"}]}],[{"66":[{"type":"bad","value":"\nformat('%<greeting>s', greeting: 'Hello')\nformat('%{greeting}', 'Hello')\n\n"},{"type":"good","value":"\nformat('%s', 'Hello')\n"}]}],[{"67":[{"type":"bad","value":"\n$foo = 2\nbar = $foo + 5\n\n"},{"type":"good","value":"\nFOO = 2\nfoo = 2\n$stdin.read\n"}]}],[{"68":[{"type":"bad","value":"\ndef test\n if something\n work\n end\nend\n\n"},{"type":"good","value":"\ndef test\n return unless something\n work\nend\n\n# also good\ndef test\n work if something\nend\n\n"},{"type":"bad","value":"\nif something\n raise 'exception'\nelse\n ok\nend\n\n"},{"type":"good","value":"\nraise 'exception' if something\nok\n"}]}],[{"69":[{"type":"bad","value":"\n{:a => 2}\n{b: 1, :c => 2}\n\n"},{"type":"good","value":"\n{a: 2, b: 1}\n{:c => 2, 'd' => 2} \n{d: 1, 'e' => 2} \n"}]}],[{"70":[{"type":"bad","value":"\n{a: 1, b: 2}\n{c: 1, 'd' => 5}\n\n"},{"type":"good","value":"\n{:a => 1, :b => 2}\n"}]}],[{"71":[{"type":"bad","value":"\n{:a => 1, b: 2}\n{c: 1, 'd' => 2}\n\n"},{"type":"good","value":"\n{:a => 1, :b => 2}\n{c: 1, d: 2}\n"}]}],[{"72":[{"type":"bad","value":"\n{:a => 1, :b => 2}\n{c: 2, 'd' => 3} \n\n"},{"type":"good","value":"\n{a: 1, b: 2}\n{:c => 3, 'd' => 4}\n"}]}],[{"73":[{"type":"bad","value":"\nif condition\n do_x\n do_z\nelse\n do_y\n do_z\nend\n\n"},{"type":"good","value":"\nif condition\n do_x\nelse\n do_y\nend\ndo_z\n\n"},{"type":"bad","value":"\nif condition\n do_z\n do_x\nelse\n do_z\n do_y\nend\n\n"},{"type":"good","value":"\ndo_z\nif condition\n do_x\nelse\n do_y\nend\n\n"},{"type":"bad","value":"\ncase foo\nwhen 1\n do_x\nwhen 2\n do_x\nelse\n do_x\nend\n\n"},{"type":"good","value":"\ncase foo\nwhen 1\n do_x\n do_y\nwhen 2\n nothing\nelse\n do_x\n do_z\nend\n"}]}],[{"74":[{"type":"bad","value":"\nif condition_a\n action_a\nelse\n if condition_b\n action_b\n else\n action_c\n end\nend\n\n"},{"type":"good","value":"\nif condition_a\n action_a\nelsif condition_b\n action_b\nelse\n action_c\nend\n"}]}],[{"75":[{"type":"bad","value":"\nif condition\n do_stuff(bar)\nend\n\nunless qux.empty?\n Foo.do_something\nend\n\n"},{"type":"good","value":"\ndo_stuff(bar) if condition\nFoo.do_something unless qux.empty?\n"}]}],[{"76":[{"type":"bad","value":"\ntired? ? 'stop' : 'go faster' if running?\n\n"},{"type":"bad","value":"\nif tired?\n \"please stop\"\nelse\n \"keep going\"\nend if running?\n\n"},{"type":"good","value":"\nif running?\n tired? ? 'stop' : 'go faster'\nend\n"}]}],[{"77":[{"type":"bad","value":"\nresult = if some_condition; something else another_thing end\n\n"},{"type":"good","value":"\nresult = some_condition ? something : another_thing\n"}]}],[{"78":[{"type":"bad","value":"\nraise 'Error message here'\n\n"},{"type":"good","value":"\nraise ArgumentError, 'Error message here'\n"}]}],[{"79":[{"type":"bad","value":"\nwhile true\n work\nend\n\n"},{"type":"good","value":"\nloop do\n work\nend\n"}]}],[{"80":[{"type":"bad","value":"\n!foo.none?\n!foo.any? { |f| f.even? }\n!foo.blank?\n!(foo == bar)\nfoo.select { |f| !f.even? }\nfoo.reject { |f| f != 7 }\n\n"},{"type":"good","value":"\nfoo.none?\nfoo.blank?\nfoo.any? { |f| f.even? }\nfoo != bar\nfoo == bar\n!!('foo' =~ /^\\w+$/)\n!(foo.class < Numeric)\n"}]}],[{"81":[{"type":"bad","value":"\nip_address = '127.59.241.29'\n\n"},{"type":"good","value":"\nip_address = ENV['DEPLOYMENT_IP_ADDRESS']\n"}]}],[{"82":[{"type":"bad","value":"\nf = lambda { |x| x }\nf = ->(x) do\n x\n end\n\n"},{"type":"good","value":"\nf = ->(x) { x }\nf = lambda do |x|\n x\n end\n"}]}],[{"83":[{"type":"bad","value":"\nf = ->(x) { x }\nf = ->(x) do\n x\n end\n\n"},{"type":"good","value":"\nf = lambda { |x| x }\nf = lambda do |x|\n x\n end\n"}]}],[{"84":[{"type":"bad","value":"\nf = lambda { |x| x }\nf = lambda do |x|\n x\n end\n\n"},{"type":"good","value":"\nf = ->(x) { x }\nf = ->(x) do\n x\n end\n"}]}],[{"85":[{"type":"bad","value":"\nlambda.(x, y)\n\n"},{"type":"good","value":"\nlambda.call(x, y)\n"}]}],[{"86":[{"type":"bad","value":"\nlambda.call(x, y)\n\n"},{"type":"good","value":"\nlambda.(x, y)\n"}]}],[{"87":[{"type":"bad","value":"\nsome_str = 'ala' +\n 'bala'\n\nsome_str = 'ala' <<\n 'bala'\n\n"},{"type":"good","value":"\nsome_str = 'ala' \\\n 'bala'\n"}]}],[{"88":[{"type":"bad","value":"\nobject.some_method()\n\n"},{"type":"good","value":"\nobject.some_method\n"}]}],[{"89":[]}],[{"90":[{"type":"bad","value":"\ndef bar num1, num2\n num1 + num2\nend\n\ndef foo descriptive_var_name,\n another_descriptive_var_name,\n last_descriptive_var_name\n do_something\nend\n\n"},{"type":"good","value":"\ndef bar(num1, num2)\n num1 + num2\nend\n\ndef foo(descriptive_var_name,\n another_descriptive_var_name,\n last_descriptive_var_name)\n do_something\nend\n"}]}],[{"91":[{"type":"bad","value":"\ndef bar(num1, num2)\n num1 + num2\nend\n\ndef foo(descriptive_var_name,\n another_descriptive_var_name,\n last_descriptive_var_name)\n do_something\nend\n\n"},{"type":"good","value":"\ndef bar num1, num2\n num1 + num2\nend\n\ndef foo descriptive_var_name,\n another_descriptive_var_name,\n last_descriptive_var_name\n do_something\nend\n"}]}],[{"92":[{"type":"bad","value":"\ndef bar(num1, num2)\n num1 + num2\nend\n\ndef foo descriptive_var_name,\n another_descriptive_var_name,\n last_descriptive_var_name\n do_something\nend\n\n"},{"type":"good","value":"\ndef bar num1, num2\n num1 + num2\nend\n\ndef foo(descriptive_var_name,\n another_descriptive_var_name,\n last_descriptive_var_name)\n do_something\nend\n"}]}],[{"93":[{"type":"bad","value":"\nbar = [foo.min, foo.max]\nreturn foo.min, foo.max\n\n"},{"type":"good","value":"\nbar = foo.minmax\nreturn foo.minmax\n"}]}],[{"94":[{"type":"bad","value":"\nif condition\n statement\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nelse\n the content of `else` branch will be determined by Style/EmptyElse\nend\n\n"},{"type":"good","value":"\ncase var\nwhen condition\n statement\nend\n\n"},{"type":"good","value":"\ncase var\nwhen condition\n statement\nelse\n the content of `else` branch will be determined by Style/EmptyElse\nend\n"}]}],[{"95":[{"type":"bad","value":"\ncase var\nwhen condition\n statement\nend\n\n"},{"type":"good","value":"\ncase var\nwhen condition\n statement\nelse\n the content of `else` branch will be determined by Style/EmptyElse\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nelse\n the content of `else` branch will be determined by Style/EmptyElse\nend\n"}]}],[{"96":[{"type":"bad","value":"\nif condition\n statement\nend\n\n"},{"type":"bad","value":"\ncase var\nwhen condition\n statement\nend\n\n"},{"type":"good","value":"\nif condition\n statement\nelse\n the content of `else` branch will be determined by Style/EmptyElse\nend\n\n"},{"type":"good","value":"\ncase var\nwhen condition\n statement\nelse\n the content of `else` branch will be determined by Style/EmptyElse\nend\n"}]}],[{"97":[{"type":"bad","value":"\nclass Foo\n include Bar, Qox\nend\n\n"},{"type":"good","value":"\nclass Foo\n include Qox\n include Bar\nend\n"}]}],[{"98":[{"type":"bad","value":"\nclass Foo\n extend Bar\n extend Qox\nend\n\n"},{"type":"good","value":"\nclass Foo\n extend Qox, Bar\nend\n"}]}],[{"99":[{"type":"bad","value":"\ninclude M\n\nclass C\nend\n\n"},{"type":"bad","value":"\nextend M\n\nclass C\nend\n\n"},{"type":"bad","value":"\nprepend M\n\nclass C\nend\n\n"},{"type":"good","value":"\nclass C\n include M\nend\n\n"},{"type":"good","value":"\nclass C\n extend M\nend\n\n"},{"type":"good","value":"\nclass C\n prepend M\nend\n"}]}],[{"100":[{"type":"bad","value":"\nmodule Test\n extend self\n ...\nend\n\n"},{"type":"good","value":"\nmodule Test\n module_function\n ...\nend\n"}]}],[{"101":[{"type":"good","value":"\nmodule Test\n extend self\n ...\n private\n ...\nend\n"}]}],[{"102":[{"type":"bad","value":"\nmodule Test\n module_function\n # ...\nend\n\n"},{"type":"good","value":"\nmodule Test\n extend self\n # ...\nend\n"},{"type":"bad","value":"le Test\n extend self\n # ...\nend\n"},{"type":"bad","value":"st\n extend self\n # ...\nend\n"},{"type":"bad","value":"extend self\n # ...\nend\n"},{"type":"bad","value":"d self\n # ...\nend\n"},{"type":"bad","value":"f\n # ...\nend\n"},{"type":"bad","value":" ...\nend\n"}]}],[{"103":[]}],[{"104":[{"type":"bad","value":"\n{\n result: 'this should not happen'\n} unless cond\n\n"},{"type":"good","value":"\n{ result: 'ok' } if cond\n"}]}],[{"105":[{"type":"bad","value":"\nif cond then\nend\n\n"},{"type":"good","value":"\nif cond then a\nelsif cond then b\nend\n"}]}],[{"106":[{"type":"bad","value":"\nfoo ||= (\n bar\n baz\n)\n\n"},{"type":"good","value":"\nfoo ||= begin\n bar\n baz\nend\n"}]}],[{"107":[{"type":"bad","value":"\nfoo ||= begin\n bar\n baz\nend\n\n"},{"type":"good","value":"\nfoo ||= (\n bar\n baz\n)\n"}]}],[{"108":[{"type":"good","value":"\n\ndef foo(bar, baz)\nend\n\n"},{"type":"bad","value":"\n\ndef foo(bar,\n baz)\nend\n"}]}],[{"109":[{"type":"bad","value":"\na = cond ?\n b : c\na = cond ? b :\n c\na = cond ?\n b :\n c\n\n"},{"type":"good","value":"\na = cond ? b : c\na =\n if cond\n b\n else\n c\n end\n"}]}],[{"110":[{"type":"bad","value":"\na = 'a'\nfoo if a == 'a' || a == 'b' || a == 'c'\n\n"},{"type":"good","value":"\na = 'a'\nfoo if ['a', 'b', 'c'].include?(a)\n"}]}],[{"111":[{"type":"bad","value":"\nCONST = [1, 2, 3]\n\n"},{"type":"good","value":"\nCONST = [1, 2, 3].freeze\n\n"},{"type":"good","value":"\nCONST = <<~TESTING.freeze\n This is a heredoc\nTESTING\n\n"},{"type":"good","value":"\nCONST = Something.new\n"}]}],[{"112":[{"type":"bad","value":"\nCONST = Something.new\n\n"},{"type":"bad","value":"\nCONST = Struct.new do\n def foo\n puts 1\n end\nend\n\n"},{"type":"good","value":"\nCONST = Something.new.freeze\n\n"},{"type":"good","value":"\nCONST = Struct.new do\n def foo\n puts 1\n end\nend.freeze\n"}]}],[{"113":[{"type":"bad","value":"\n\nif !foo\n bar\nend\n\n"},{"type":"good","value":"\n\nunless foo\n bar\nend\n\n"},{"type":"bad","value":"\n\nbar if !foo\n\n"},{"type":"good","value":"\n\nbar unless foo\n"}]}],[{"114":[{"type":"bad","value":"\n\nif !foo\n bar\nend\n\n"},{"type":"good","value":"\n\nunless foo\n bar\nend\n\n"},{"type":"good","value":"\n\nbar if !foo\n"}]}],[{"115":[{"type":"bad","value":"\n\nbar if !foo\n\n"},{"type":"good","value":"\n\nbar unless foo\n\n"},{"type":"good","value":"\n\nif !foo\n bar\nend\n"}]}],[{"116":[{"type":"bad","value":"\nwhile !foo\n bar\nend\n\n"},{"type":"good","value":"\nuntil foo\n bar\nend\n\n"},{"type":"bad","value":"\nbar until !foo\n\n"},{"type":"good","value":"\nbar while foo\nbar while !foo && baz\n"}]}],[{"117":[{"type":"bad","value":"\nsomething if a if b\n\n"},{"type":"good","value":"\nsomething if b && a\n"}]}],[{"118":[{"type":"good","value":"\nmethod1(method2(arg), method3(arg))\n\n"},{"type":"bad","value":"\nmethod1(method2 arg, method3, arg)\n"}]}],[{"119":[{"type":"bad","value":"\na ? (b ? b1 : b2) : a2\n\n"},{"type":"good","value":"\nif a\n b ? b1 : b2\nelse\n a2\nend\n"}]}],[{"120":[{"type":"bad","value":"\n[1, 2].each do |a|\n if a == 1\n puts a\n end\nend\n\n"},{"type":"good","value":"\n[1, 2].each do |a|\n next unless a == 1\n puts a\nend\n\n"},{"type":"good","value":"\n[1, 2].each do |o|\n puts o unless o == 1\nend\n"}]}],[{"121":[{"type":"bad","value":"\n[1, 2].each do |o|\n puts o unless o == 1\nend\n\n"},{"type":"bad","value":"\n[1, 2].each do |a|\n if a == 1\n puts a\n end\nend\n\n"},{"type":"good","value":"\n[1, 2].each do |a|\n next unless a == 1\n puts a\nend\n"}]}],[{"122":[{"type":"bad","value":"\nif x == nil\nend\n\n"},{"type":"good","value":"\nif x.nil?\nend\n"}]}],[{"123":[{"type":"bad","value":"\nif x.nil?\nend\n\n"},{"type":"good","value":"\nif x == nil\nend\n"}]}],[{"124":[{"type":"bad","value":"\nif x != nil\nend\n\n"},{"type":"bad","value":"\nif !x.nil?\nend\n\n"},{"type":"good","value":"\nif x\nend\n"}]}],[{"125":[{"type":"bad","value":"\nx = (not something)\n\n"},{"type":"good","value":"\nx = !something\n"}]}],[{"126":[{"type":"bad","value":"\nnum = 01234\n\n"},{"type":"bad","value":"\nnum = 0O1234\nnum = 0X12AB\nnum = 0B10101\n\n"},{"type":"bad","value":"\nnum = 0D1234\nnum = 0d1234\n\n"},{"type":"good","value":"\nnum = 0o1234\nnum = 0x12AB\nnum = 0b10101\nnum = 1234\n"}]}],[{"127":[{"type":"bad","value":"\nnum = 0o1234\nnum = 0O1234\n\n"},{"type":"good","value":"\nnum = 01234\n"}]}],[{"128":[{"type":"bad","value":"\n\n1000000\n1_00_000\n1_0000\n\n"},{"type":"good","value":"\n\n1_000_000\n1000\n\n"},{"type":"good","value":"\n\n10_000_00\n"}]}],[{"129":[{"type":"bad","value":"\n\nfoo == 0\n0 > foo\nbar.baz > 0\n\n"},{"type":"good","value":"\n\nfoo.zero?\nfoo.negative?\nbar.baz.positive?\n"}]}],[{"130":[{"type":"bad","value":"\n\nfoo.zero?\nfoo.negative?\nbar.baz.positive?\n\n"},{"type":"good","value":"\n\nfoo == 0\n0 > foo\nbar.baz > 0\n"}]}],[{"131":[{"type":"bad","value":"\nif foo then boo else doo end\nunless foo then boo else goo end\n\n"},{"type":"good","value":"\nfoo ? boo : doo\nboo if foo\nif foo then boo end\n\n"},{"type":"good","value":"\nif foo\n boo\nelse\n doo\nend\n"}]}],[{"132":[{"type":"bad","value":"\ndef fry(options = {})\n temperature = options.fetch(:temperature, 300)\n ...\nend\n\n"},{"type":"good","value":"\ndef fry(temperature: 300)\n ...\nend\n"}]}],[{"133":[{"type":"bad","value":"\ndef foo(a = 1, b, c)\nend\n\n"},{"type":"good","value":"\ndef baz(a, b, c = 1)\nend\n\ndef foobar(a = 1, b = 2, c = 3)\nend\n"}]}],[{"134":[{"type":"bad","value":"\nname = name ? name : 'Bozhidar'\n\n"},{"type":"bad","value":"\nname = if name\n name\n else\n 'Bozhidar'\n end\n\n"},{"type":"bad","value":"\nunless name\n name = 'Bozhidar'\nend\n\n"},{"type":"bad","value":"\nname = 'Bozhidar' unless name\n\n"},{"type":"good","value":"\nname ||= 'Bozhidar'\n"}]}],[{"135":[{"type":"bad","value":"\na, b, c = 1, 2, 3\na, b, c = [1, 2, 3]\n\n"},{"type":"good","value":"\none, two = *foo\na, b = foo()\na, b = b, a\n\na = 1\nb = 2\nc = 3\n"}]}],[{"136":[{"type":"bad","value":"\nx += 1 while (x < 10)\nfoo unless (bar || baz)\n\nif (x > 10)\nelsif (x < 3)\nend\n\n"},{"type":"good","value":"\nx += 1 while x < 10\nfoo unless bar || baz\n\nif x > 10\nelsif x < 3\nend\n"}]}],[{"137":[{"type":"bad","value":"\nif (x > 10 &&\n y > 10)\nend\n\n"},{"type":"good","value":"\n if x > 10 &&\n y > 10\n end\n"}]}],[{"138":[{"type":"good","value":"\nif (x > 10 &&\n y > 10)\nend\n"}]}],[{"139":[{"type":"good","value":"\n%w[alpha beta] + %i(gamma delta)\n\n"},{"type":"bad","value":"\n%W(alpha #{beta})\n\n"},{"type":"bad","value":"\n%I(alpha beta)\n"}]}],[{"140":[{"type":"bad","value":"\n%Q[Mix the foo into the baz.]\n%Q(They all said: 'Hooray!')\n\n"},{"type":"good","value":"\n%q[Mix the foo into the baz]\n%q(They all said: 'Hooray!')\n"}]}],[{"141":[{"type":"bad","value":"\n%q/Mix the foo into the baz./\n%q{They all said: 'Hooray!'}\n\n"},{"type":"good","value":"\n%Q/Mix the foo into the baz./\n%Q{They all said: 'Hooray!'}\n"}]}],[{"142":[{"type":"bad","value":"\nputs $1\n\n"},{"type":"good","value":"\nputs Regexp.last_match(1)\n"}]}],[{"143":[{"type":"bad","value":"\np = Proc.new { |n| puts n }\n\n"},{"type":"good","value":"\np = proc { |n| puts n }\n"}]}],[{"144":[{"type":"bad","value":"\nraise StandardError.new(\"message\")\n\n"},{"type":"good","value":"\nraise StandardError, \"message\"\nfail \"message\"\nraise MyCustomError.new(arg1, arg2, arg3)\nraise MyKwArgError.new(key1: val1, key2: val2)\n"}]}],[{"145":[{"type":"bad","value":"\nraise StandardError, \"message\"\nraise RuntimeError, arg1, arg2, arg3\n\n"},{"type":"good","value":"\nraise StandardError.new(\"message\")\nraise MyCustomError.new(arg1, arg2, arg3)\nfail \"message\"\n"}]}],[{"146":[{"type":"bad","value":"\nrand(6) + 1\n1 + rand(6)\nrand(6) - 1\n1 - rand(6)\nrand(6).succ\nrand(6).pred\nRandom.rand(6) + 1\nKernel.rand(6) + 1\nrand(0..5) + 1\n\n"},{"type":"good","value":"\nrand(1..6)\nrand(1...7)\n"}]}],[{"147":[{"type":"bad","value":"\ndef redundant\n begin\n ala\n bala\n rescue StandardError => e\n something\n end\nend\n\n"},{"type":"good","value":"\ndef preferred\n ala\n bala\nrescue StandardError => e\n something\nend\n\n"},{"type":"bad","value":"\ndo_something do\n begin\n something\n rescue => ex\n anything\n end\nend\n\n"},{"type":"good","value":"\ndo_something do\n something\nrescue => ex\n anything\nend\n\n"},{"type":"good","value":"\n-> do\n begin\n foo\n rescue Bar\n baz\n end\nend\n"}]}],[{"148":[{"type":"bad","value":"\nx == y ? true : false\n\n"},{"type":"bad","value":"\nif x == y\n true\nelse\n false\nend\n\n"},{"type":"good","value":"\nx == y\n\n"},{"type":"bad","value":"\nx == y ? false : true\n\n"},{"type":"good","value":"\nx != y\n"}]}],[{"149":[{"type":"bad","value":"d\nraise RuntimeError, 'message'\n\n# Bad\nraise RuntimeError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"se RuntimeError, 'message'\n\n# Bad\nraise RuntimeError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"ntimeError, 'message'\n\n# Bad\nraise RuntimeError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"Error, 'message'\n\n# Bad\nraise RuntimeError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":", 'message'\n\n# Bad\nraise RuntimeError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"ssage'\n\n# Bad\nraise RuntimeError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"'\n\n# Bad\nraise RuntimeError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"Bad\nraise RuntimeError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"aise RuntimeError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"RuntimeError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"meError.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"or.new('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"w('message')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"ssage')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":"')\n\n# Good\nraise 'message'\n"},{"type":"bad","value":" Good\nraise 'message'\n"}]}],[{"150":[{"type":"bad","value":"\nCONST = 1.freeze\n\n"},{"type":"good","value":"\nCONST = 1\n"}]}],[{"151":[{"type":"bad","value":"\n(x) if ((y.z).nil?)\n\n"},{"type":"good","value":"\nx if y.z.nil?\n"}]}],[{"152":[{"type":"bad","value":"\ndef test\n return something\nend\n\n"},{"type":"bad","value":"\ndef test\n one\n two\n three\n return something\nend\n\n"},{"type":"good","value":"\ndef test\n return something if something_else\nend\n\n"},{"type":"good","value":"\ndef test\n if x\n elsif y\n else\n end\nend\n"}]}],[{"153":[{"type":"bad","value":"\ndef foo(bar)\n self.baz\nend\n\n"},{"type":"good","value":"\ndef foo(bar)\n self.bar\nend\n\ndef foo\n bar = 1\n self.bar\nend\n\ndef foo\n %w[x y z].select do |bar|\n self.bar == bar\n end\nend\n"}]}],[{"154":[{"type":"bad","value":"\nsnake_case = %r{^[\\dA-Z_]+$}\n\n"},{"type":"bad","value":"\nregex = %r{\n foo\n (bar)\n (baz)\n}x\n\n"},{"type":"good","value":"\nsnake_case = /^[\\dA-Z_]+$/\n\n"},{"type":"good","value":"\nregex = /\n foo\n (bar)\n (baz)\n/x\n"}]}],[{"155":[{"type":"bad","value":"\nsnake_case = /^[\\dA-Z_]+$/\n\n"},{"type":"bad","value":"\nregex = /\n foo\n (bar)\n (baz)\n/x\n\n"},{"type":"good","value":"\nsnake_case = %r{^[\\dA-Z_]+$}\n\n"},{"type":"good","value":"\nregex = %r{\n foo\n (bar)\n (baz)\n}x\n"}]}],[{"156":[{"type":"bad","value":"\nsnake_case = %r{^[\\dA-Z_]+$}\n\n"},{"type":"bad","value":"\nregex = /\n foo\n (bar)\n (baz)\n/x\n\n"},{"type":"good","value":"\nsnake_case = /^[\\dA-Z_]+$/\n\n"},{"type":"good","value":"\nregex = %r{\n foo\n (bar)\n (baz)\n}x\n"}]}],[{"157":[{"type":"bad","value":"\nx =~ /home\\//\n\n"},{"type":"good","value":"\nx =~ %r{home/}\n"}]}],[{"158":[{"type":"good","value":"\nx =~ /home\\//\n"}]}],[{"159":[{"type":"bad","value":"\nsome_method rescue handle_error\n\n"},{"type":"good","value":"\nbegin\n some_method\nrescue\n handle_error\nend\n"}]}],[{"160":[{"type":"bad","value":"\nbegin\n foo\nrescue StandardError\n bar\nend\n\n"},{"type":"good","value":"\nbegin\n foo\nrescue\n bar\nend\n\n"},{"type":"good","value":"\nbegin\n foo\nrescue OtherError\n bar\nend\n\n"},{"type":"good","value":"\nbegin\n foo\nrescue StandardError, SecurityError\n bar\nend\n"}]}],[{"161":[{"type":"bad","value":"\nbegin\n foo\nrescue\n bar\nend\n\n"},{"type":"good","value":"\nbegin\n foo\nrescue StandardError\n bar\nend\n\n"},{"type":"good","value":"\nbegin\n foo\nrescue OtherError\n bar\nend\n\n"},{"type":"good","value":"\nbegin\n foo\nrescue StandardError, SecurityError\n bar\nend\n"}]}],[{"162":[{"type":"bad","value":"\ndef foo(arg)\n return nil if arg\nend\n\n"},{"type":"good","value":"\ndef foo(arg)\n return if arg\nend\n"}]}],[{"163":[{"type":"bad","value":"\ndef foo(arg)\n return if arg\nend\n\n"},{"type":"good","value":"\ndef foo(arg)\n return nil if arg\nend\n"}]}],[{"164":[{"type":"bad","value":"\nfoo.bar if foo\nfoo.bar.baz if foo\nfoo.bar(param1, param2) if foo\nfoo.bar { |e| e.something } if foo\nfoo.bar(param) { |e| e.something } if foo\n\n"},{"type":"good","value":"\nfoo&.bar\nfoo&.bar&.baz\nfoo&.bar(param1, param2)\nfoo&.bar { |e| e.something }\nfoo&.bar(param) { |e| e.something }\nfoo && foo.bar.baz.qux\nfoo && foo.nil?\n"}]}],[{"165":[{"type":"bad","value":"\nx = x + 1\n\n"},{"type":"good","value":"\nx += 1\n"}]}],[{"166":[{"type":"bad","value":"\nfoo = 1; bar = 2;\nbaz = 3;\n\n"},{"type":"good","value":"\nfoo = 1\nbar = 2\nbaz = 3\n"}]}],[{"167":[{"type":"bad","value":"\nFoo.send(:bar)\nquuz.send(:fred)\n\n"},{"type":"good","value":"\nFoo.__send__(:bar)\nquuz.public_send(:fred)\n"}]}],[{"168":[{"type":"bad","value":"\nbegin\n fail\nrescue Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n\n"},{"type":"good","value":"\nbegin\n raise\nrescue Exception\n handle it\nend\n\ndef watch_out\n raise\nrescue Exception\n handle it\nend\n\nKernel.raise\n"}]}],[{"169":[{"type":"bad","value":"\nbegin\n raise\nrescue Exception\n # handle it\nend\n\ndef watch_out\n raise\nrescue Exception\n # handle it\nend\n\nKernel.raise\n\n"},{"type":"good","value":"\nbegin\n fail\nrescue Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"n\n fail\nrescue Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"ail\nrescue Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"escue Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":" Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"ption\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"e it\nend\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"end\n\ndef watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"def watch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"atch_out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"out\n fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":" fail\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"\nrescue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"ue Exception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"ception\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"on\n # handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"# handle it\nend\n\nKernel.fail\n"},{"type":"bad","value":"dle it\nend\n\nKernel.fail\n"}]}],[{"170":[{"type":"bad","value":"\nbegin\n raise\nrescue Exception\n __handle it__\nend\n\ndef watch_out\n __Error thrown__\nrescue Exception\n fail\nend\n\nKernel.fail\nKernel.raise\n\n"},{"type":"good","value":"\nbegin\n fail\nrescue Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n raise 'Preferably with descriptive message'\nend\n\nexplicit_receiver.fail\nexplicit_receiver.raise\n"},{"type":"bad","value":"n\n fail\nrescue Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n raise 'Preferably with descriptive message'\nend\n\nexplicit_receiver.fail\nexplicit_receiver.raise\n"},{"type":"bad","value":"ail\nrescue Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n raise 'Preferably with descriptive message'\nend\n\nexplicit_receiver.fail\nexplicit_receiver.raise\n"},{"type":"bad","value":"escue Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n raise 'Preferably with descriptive message'\nend\n\nexplicit_receiver.fail\nexplicit_receiver.raise\n"},{"type":"bad","value":" Exception\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n raise 'Preferably with descriptive message'\nend\n\nexplicit_receiver.fail\nexplicit_receiver.raise\n"},{"type":"bad","value":"ption\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n raise 'Preferably with descriptive message'\nend\n\nexplicit_receiver.fail\nexplicit_receiver.raise\n"},{"type":"bad","value":"\n # handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n raise 'Preferably with descriptive message'\nend\n\nexplicit_receiver.fail\nexplicit_receiver.raise\n"},{"type":"bad","value":"handle it\nend\n\ndef watch_out\n fail\nrescue Exception\n raise 'Preferably with descriptive message'\nend\n\nexplicit_receiver.fail\nexplicit_receiver.raise\n"}]}],[{"171":[{"type":"bad","value":"\nfoo.reduce { |c, d| c + d }\nfoo.reduce { |_, _d| 1 }\n\n"},{"type":"good","value":"\nfoo.reduce { |a, b| a + b }\nfoo.reduce { |a, _b| a }\nfoo.reduce { |a, (id, _)| a + id }\nfoo.reduce { true }\n\n"},{"type":"good","value":"\nfoo.reduce do |c, d|\n c + d\nend\n"}]}],[{"172":[{"type":"bad","value":"\ndef some_method; body end\ndef link_to(url); {:name => url}; end\ndef @table.columns; super; end\n\n"},{"type":"good","value":"\ndef no_op; end\ndef self.resource_class=(klass); end\ndef @table.columns; end\n"}]}],[{"173":[{"type":"bad","value":"\n->a,b,c { a + b + c }\n\n"},{"type":"good","value":"\n->(a,b,c) { a + b + c}\n"}]}],[{"174":[{"type":"bad","value":"\n->(a,b,c) { a + b + c }\n\n"},{"type":"good","value":"\n->a,b,c { a + b + c}\n"}]}],[{"175":[{"type":"bad","value":"\n$stderr.puts('hello')\n\n"},{"type":"good","value":"\nwarn('hello')\n"}]}],[{"176":[{"type":"bad","value":"\n{ 'one' => 1, 'two' => 2, 'three' => 3 }\n\n"},{"type":"good","value":"\n{ one: 1, two: 2, three: 3 }\n"}]}],[{"177":[{"type":"bad","value":"\n\"No special symbols\"\n\"No string interpolation\"\n\"Just text\"\n\n"},{"type":"good","value":"\n'No special symbols'\n'No string interpolation'\n'Just text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"special symbols'\n'No string interpolation'\n'Just text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"al symbols'\n'No string interpolation'\n'Just text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"mbols'\n'No string interpolation'\n'Just text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"'\n'No string interpolation'\n'Just text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":" string interpolation'\n'Just text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"ng interpolation'\n'Just text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"terpolation'\n'Just text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"lation'\n'Just text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"n'\n'Just text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"ust text'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"ext'\n\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"\"Wait! What's #{this}!\"\n"},{"type":"bad","value":"! What's #{this}!\"\n"},{"type":"bad","value":"t's #{this}!\"\n"},{"type":"bad","value":"{this}!\"\n"}]}],[{"178":[{"type":"bad","value":"\n'Just some text'\n'No special chars or interpolation'\n\n"},{"type":"good","value":"\n\"Just some text\"\n\"No special chars or interpolation\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"t some text\"\n\"No special chars or interpolation\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"e text\"\n\"No special chars or interpolation\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"t\"\n\"No special chars or interpolation\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"o special chars or interpolation\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"cial chars or interpolation\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"chars or interpolation\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":" or interpolation\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"nterpolation\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"olation\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"on\"\n\"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"Every string in #{project} uses double_quotes\"\n"},{"type":"bad","value":" string in #{project} uses double_quotes\"\n"},{"type":"bad","value":"ng in #{project} uses double_quotes\"\n"},{"type":"bad","value":" #{project} uses double_quotes\"\n"},{"type":"bad","value":"oject} uses double_quotes\"\n"}]}],[{"179":[{"type":"bad","value":"\nresult = \"Tests #{success ? \"PASS\" : \"FAIL\"}\"\n\n"},{"type":"good","value":"\nresult = \"Tests #{success ? 'PASS' : 'FAIL'}\"\n"},{"type":"bad","value":"lt = \"Tests #{success ? 'PASS' : 'FAIL'}\"\n"},{"type":"bad","value":"\"Tests #{success ? 'PASS' : 'FAIL'}\"\n"},{"type":"bad","value":"s #{success ? 'PASS' : 'FAIL'}\"\n"},{"type":"bad","value":"uccess ? 'PASS' : 'FAIL'}\"\n"}]}],[{"180":[{"type":"bad","value":"\nresult = \"Tests #{success ? 'PASS' : 'FAIL'}\"\n\n"},{"type":"good","value":"\nresult = \"Tests #{success ? \"PASS\" : \"FAIL\"}\"\n"},{"type":"bad","value":"lt = \"Tests #{success ? \"PASS\" : \"FAIL\"}\"\n"},{"type":"bad","value":"\"Tests #{success ? \"PASS\" : \"FAIL\"}\"\n"},{"type":"bad","value":"s #{success ? \"PASS\" : \"FAIL\"}\"\n"},{"type":"bad","value":"uccess ? \"PASS\" : \"FAIL\"}\"\n"}]}],[{"181":[{"type":"bad","value":"\n'name'.intern\n'var'.unfavored_method\n\n"},{"type":"good","value":"\n'name'.to_sym\n'var'.preferred_method\n"}]}],[{"182":[{"type":"bad","value":"\nclass Person < Struct.new(:first_name, :last_name)\nend\n\n"},{"type":"good","value":"\nPerson = Struct.new(:first_name, :last_name)\n"}]}],[{"183":[{"type":"good","value":"\n%i[foo bar baz]\n\n"},{"type":"bad","value":"\n[:foo, :bar, :baz]\n"}]}],[{"184":[{"type":"good","value":"\n[:foo, :bar, :baz]\n\n"},{"type":"bad","value":"\n%i[foo bar baz]\n"}]}],[{"185":[{"type":"bad","value":"\n:\"symbol\"\n\n"},{"type":"good","value":"\n:symbol\n"}]}],[{"186":[{"type":"bad","value":"\nsomething.map { |s| s.upcase }\n\n"},{"type":"good","value":"\nsomething.map(&:upcase)\n"}]}],[{"187":[{"type":"bad","value":"\nfoo = (bar?) ? a : b\nfoo = (bar.baz?) ? a : b\nfoo = (bar && baz) ? a : b\n\n"},{"type":"good","value":"\nfoo = bar? ? a : b\nfoo = bar.baz? ? a : b\nfoo = bar && baz ? a : b\n"}]}],[{"188":[{"type":"bad","value":"\nfoo = bar? ? a : b\nfoo = bar.baz? ? a : b\nfoo = bar && baz ? a : b\n\n"},{"type":"good","value":"\nfoo = (bar?) ? a : b\nfoo = (bar.baz?) ? a : b\nfoo = (bar && baz) ? a : b\n"}]}],[{"189":[{"type":"bad","value":"\nfoo = (bar?) ? a : b\nfoo = (bar.baz?) ? a : b\nfoo = bar && baz ? a : b\n\n"},{"type":"good","value":"\nfoo = bar? ? a : b\nfoo = bar.baz? ? a : b\nfoo = (bar && baz) ? a : b\n"}]}],[{"190":[{"type":"bad","value":"\nclass Foo; def foo; end\nend\n\n"},{"type":"good","value":"\nclass Foo\n def foo; end\nend\n"}]}],[{"191":[{"type":"bad","value":"\ndef some_method; do_stuff\nend\n\ndef f(x); b = foo\n b[c: x]\nend\n\n"},{"type":"good","value":"\ndef some_method\n do_stuff\nend\n\ndef f(x)\n b = foo\n b[c: x]\nend\n"}]}],[{"192":[{"type":"bad","value":"\nmodule Foo extend self\nend\n\n"},{"type":"good","value":"\nmodule Foo\n extend self\nend\n"}]}],[{"193":[{"type":"bad","value":"\nmethod(1, 2,)\n\n"},{"type":"good","value":"\nmethod(1, 2)\n\n"},{"type":"good","value":"\nmethod(\n 1, 2,\n 3,\n)\n\n"},{"type":"good","value":"\nmethod(\n 1,\n 2,\n)\n"}]}],[{"194":[{"type":"bad","value":"\nmethod(1, 2,)\n\n"},{"type":"good","value":"\nmethod(1, 2)\n\n"},{"type":"good","value":"\nmethod(\n 1,\n 2,\n)\n"}]}],[{"195":[{"type":"bad","value":"\nmethod(1, 2,)\n\n"},{"type":"good","value":"\nmethod(1, 2)\n\n"},{"type":"good","value":"\nmethod(\n 1,\n 2\n)\n"}]}],[{"196":[{"type":"bad","value":"\na = [1, 2,]\n\n"},{"type":"good","value":"\na = [\n 1, 2,\n 3,\n]\n\n"},{"type":"good","value":"\na = [\n 1,\n 2,\n]\n"}]}],[{"197":[{"type":"bad","value":"\na = [1, 2,]\n\n"},{"type":"good","value":"\na = [\n 1,\n 2,\n]\n"}]}],[{"198":[{"type":"bad","value":"\na = [1, 2,]\n\n"},{"type":"good","value":"\na = [\n 1,\n 2\n]\n"}]}],[{"199":[{"type":"bad","value":"\na = { foo: 1, bar: 2, }\n\n"},{"type":"good","value":"\na = {\n foo: 1, bar: 2,\n qux: 3,\n}\n\n"},{"type":"good","value":"\na = {\n foo: 1,\n bar: 2,\n}\n"}]}],[{"200":[{"type":"bad","value":"\na = { foo: 1, bar: 2, }\n\n"},{"type":"good","value":"\na = {\n foo: 1,\n bar: 2,\n}\n"}]}],[{"201":[{"type":"bad","value":"\na = { foo: 1, bar: 2, }\n\n"},{"type":"good","value":"\na = {\n foo: 1,\n bar: 2\n}\n"}]}],[{"202":[{"type":"bad","value":"\ndef some_method\ndo_stuff; end\n\ndef do_this(x)\n baz.map { |b| b.this(x) } end\n\ndef foo\n block do\n bar\n end end\n\n"},{"type":"good","value":"\ndef some_method\n do_stuff\nend\n\ndef do_this(x)\n baz.map { |b| b.this(x) }\nend\n\ndef foo\n block do\n bar\n end\nend\n"}]}],[{"203":[{"type":"bad","value":"\na, b, _ = foo()\na, b, _, = foo()\na, _, _ = foo()\na, _, _, = foo()\n\n"},{"type":"good","value":"\na, b, = foo()\na, = foo()\n*a, b, _ = foo()\n# => We need to know to not include 2 variables in a\na, *b, _ = foo()\n# => The correction `a, *b, = foo()` is a syntax error\n\n"},{"type":"good","value":" if AllowNamedUnderscoreVariables is true\na, b, _something = foo()\n"}]}],[{"204":[{"type":"bad","value":"\ndef foo\n @foo\nend\n\ndef bar=(val)\n @bar = val\nend\n\ndef self.baz\n @baz\nend\n\n"},{"type":"good","value":"\nattr_reader :foo\nattr_writer :bar\n\nclass << self\n attr_reader :baz\nend\n"}]}],[{"205":[{"type":"bad","value":"\nunless foo_bar.nil?\n do something...\nelse\n do a different thing...\nend\n\n"},{"type":"good","value":"\nif foo_bar.present?\n do something...\nelse\n do a different thing...\nend\n"}]}],[{"206":[{"type":"bad","value":"\n%W(cat dog pig)\n%W[door wall floor]\n\n"},{"type":"good","value":"\n%w/swim run bike/\n%w[shirt pants shoes]\n%W(apple #{fruit} grape)\n"},{"type":"bad","value":"wim run bike/\n%w[shirt pants shoes]\n%W(apple #{fruit} grape)\n"},{"type":"bad","value":"un bike/\n%w[shirt pants shoes]\n%W(apple #{fruit} grape)\n"},{"type":"bad","value":"ke/\n%w[shirt pants shoes]\n%W(apple #{fruit} grape)\n"},{"type":"bad","value":"w[shirt pants shoes]\n%W(apple #{fruit} grape)\n"},{"type":"bad","value":"rt pants shoes]\n%W(apple #{fruit} grape)\n"},{"type":"bad","value":"nts shoes]\n%W(apple #{fruit} grape)\n"},{"type":"bad","value":"hoes]\n%W(apple #{fruit} grape)\n"},{"type":"bad","value":"\n%W(apple #{fruit} grape)\n"},{"type":"bad","value":"pple #{fruit} grape)\n"},{"type":"bad","value":"#{fruit} grape)\n"},{"type":"bad","value":"it} grape)\n"}]}],[{"207":[{"type":"bad","value":"\na = b ? b : c\n\n"},{"type":"good","value":"\na = b || c\n"}]}],[{"208":[{"type":"bad","value":"\nif b\n b\nelse\n c\nend\n\n"},{"type":"good","value":"\nb || c\n\n"},{"type":"good","value":"\nif b\n b\nelsif cond\n c\nend\n"}]}],[{"209":[{"type":"bad","value":"\nname = %q(Bruce Wayne)\ntime = %q(8 o'clock)\nquestion = %q(\"What did you say?\")\n\n"},{"type":"good","value":"\nname = 'Bruce Wayne'\ntime = \"8 o'clock\"\nquestion = '\"What did you say?\"'\n"}]}],[{"210":[{"type":"bad","value":"\n'foo'.unpack('h*').first\n'foo'.unpack('h*')[0]\n'foo'.unpack('h*').slice(0)\n'foo'.unpack('h*').at(0)\n\n"},{"type":"good","value":"\n'foo'.unpack1('h*')\n"}]}],[{"211":[{"type":"bad","value":"\n\"His name is #$name\"\n/check #$pattern/\n\"Let's go to the #@store\"\n\n"},{"type":"good","value":"\n\"His name is #{$name}\"\n/check #{$pattern}/\n\"Let's go to the #{@store}\"\n"},{"type":"bad","value":" name is #{$name}\"\n/check #{$pattern}/\n\"Let's go to the #{@store}\"\n"},{"type":"bad","value":" is #{$name}\"\n/check #{$pattern}/\n\"Let's go to the #{@store}\"\n"},{"type":"bad","value":"{$name}\"\n/check #{$pattern}/\n\"Let's go to the #{@store}\"\n"},{"type":"bad","value":"e}\"\n/check #{$pattern}/\n\"Let's go to the #{@store}\"\n"},{"type":"bad","value":"check #{$pattern}/\n\"Let's go to the #{@store}\"\n"},{"type":"bad","value":" #{$pattern}/\n\"Let's go to the #{@store}\"\n"},{"type":"bad","value":"attern}/\n\"Let's go to the #{@store}\"\n"},{"type":"bad","value":"n}/\n\"Let's go to the #{@store}\"\n"},{"type":"bad","value":"Let's go to the #{@store}\"\n"},{"type":"bad","value":" go to the #{@store}\"\n"},{"type":"bad","value":"o the #{@store}\"\n"},{"type":"bad","value":" #{@store}\"\n"},{"type":"bad","value":"tore}\"\n"}]}],[{"212":[{"type":"bad","value":"\ncase foo\nwhen 1; 'baz'\nwhen 2; 'bar'\nend\n\n"},{"type":"good","value":"\ncase foo\nwhen 1 then 'baz'\nwhen 2 then 'bar'\nend\n"}]}],[{"213":[{"type":"bad","value":"\nwhile x.any? do\n do_something(x.pop)\nend\n\n"},{"type":"good","value":"\nwhile x.any?\n do_something(x.pop)\nend\n"}]}],[{"214":[{"type":"bad","value":"\nuntil x.empty? do\n do_something(x.pop)\nend\n\n"},{"type":"good","value":"\nuntil x.empty?\n do_something(x.pop)\nend\n"}]}],[{"215":[{"type":"bad","value":"\nwhile x < 10\n x += 1\nend\n\n"},{"type":"good","value":"\nx += 1 while x < 10\n"}]}],[{"216":[{"type":"bad","value":"\nuntil x > 10\n x += 1\nend\n\n"},{"type":"good","value":"\nx += 1 until x > 10\n"}]}],[{"217":[{"type":"good","value":"\n%w[foo bar baz]\n\n"},{"type":"bad","value":"\n['foo', 'bar', 'baz']\n"}]}],[{"218":[{"type":"good","value":"\n['foo', 'bar', 'baz']\n\n"},{"type":"bad","value":"\n%w[foo bar baz]\n"}]}],[{"219":[{"type":"bad","value":"\n99 == foo\n\"bar\" != foo\n42 >= foo\n10 < bar\n\n"},{"type":"good","value":"\nfoo == 99\nfoo == \"bar\"\nfoo <= 42\nbar > 10\n"}]}],[{"220":[{"type":"bad","value":"\n99 == foo\n\"bar\" != foo\n\n"},{"type":"good","value":"\n99 >= foo\n3 < a && a < 5\n"}]}],[{"221":[{"type":"bad","value":"\nfoo == 99\nfoo == \"bar\"\nfoo <= 42\nbar > 10\n\n"},{"type":"good","value":"\n99 == foo\n\"bar\" != foo\n42 >= foo\n10 < bar\n"}]}],[{"222":[{"type":"bad","value":"\n99 >= foo\n3 < a && a < 5\n\n"},{"type":"good","value":"\n99 == foo\n\"bar\" != foo\n"}]}],[{"223":[{"type":"bad","value":"\n[1, 2, 3].length == 0\n0 == \"foobar\".length\narray.length < 1\n{a: 1, b: 2}.length != 0\nstring.length > 0\nhash.size > 0\n\n"},{"type":"good","value":"\n[1, 2, 3].empty?\n\"foobar\".empty?\narray.empty?\n!{a: 1, b: 2}.empty?\n!string.empty?\n!hash.empty?\n"}]}]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment