Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created October 13, 2015 08:30
Show Gist options
  • Save anonymous/ad501dfda17a9829af9a to your computer and use it in GitHub Desktop.
Save anonymous/ad501dfda17a9829af9a to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
module PuppetX
def munge_boolean(value)
puts value
value
end
class BooleanProperty
def unsafe_munge(value)
munge_boolean(value)
end
end
end
prop = PuppetX::BooleanProperty.new()
prop.unsafe_munge(:value_to_munge)
tdevelioglu@traveler:/tmp$ ./blah.rb
./blah.rb:11:in `unsafe_munge': undefined method `munge_boolean' for #<PuppetX::BooleanProperty:0x0000000295f568> (NoMethodError)
from ./blah.rb:17:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment