Skip to content

Instantly share code, notes, and snippets.

@johnkpaul
Last active August 24, 2016 20:39
Show Gist options
  • Save johnkpaul/0a7adf56837daf181663012e1cc952c1 to your computer and use it in GitHub Desktop.
Save johnkpaul/0a7adf56837daf181663012e1cc952c1 to your computer and use it in GitHub Desktop.
1) Run `ruby test.rb` 2) Why are global methods in the private method list of lambdas?
def test_method
puts 'test'
end
l = -> { puts 'lambda' }
# Why does this print true??
puts l.private_methods.include? :test_method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment