Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class TestCase1
if false
def foo
'Hello World'
end
end
end
puts TestCase1.new.foo # test.rb:9:in `<main>': undefined method `foo' for #<TestCase1:0x007ffff35bfe78> (NoMethodError)
class TestCase2
if true
def foo
'Hello World'
end
end
end
puts TestCase2.new.fo() # test.rb:19:in `<main>': undefined method `fo' for #<TestCase2:0x007fffbcd27f80> (NoMethodError)
# Did you mean? foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment