Skip to content

Instantly share code, notes, and snippets.

@enebo
Created January 18, 2011 20:39
Show Gist options
  • Save enebo/785098 to your computer and use it in GitHub Desktop.
Save enebo/785098 to your computer and use it in GitHub Desktop.
Yuck
class Base
def meth(a, b = 4)
# puts a.inspect, b.inspect
end
end
class Derived < Base
d = 1
define_method(:meth) do |a, d|
puts "d before super #{d}"
super
end
define_method(:check) do
puts d
end
end
e = Derived.new
e.check
e.meth(1, 2)
e.check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment