Skip to content

Instantly share code, notes, and snippets.

@mjc
Last active Aug 29, 2015
Embed
What would you like to do?
class A
def bar(*blah)
blah
end
end
class Foo < A
def bar(*)
no_commands { super }
end
def no_commands
yield
end
end
class Baz < A
def bar(*)
super
end
end
puts Foo.new.bar(:name).inspect
# jruby 1.7.13:
# => [:name]
# jruby 207df03
# => [[:name]]
puts Baz.new.bar(:name).inspect
# both
# [:name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment