Last active
August 24, 2016 20:39
-
-
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?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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