-
-
Save anonymous/5e1953c1c1410b2a9a9d to your computer and use it in GitHub Desktop.
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
class MyHash | |
def initialize | |
end # initialize | |
def []=(key, value, opt: nil) | |
puts key | |
puts value | |
puts opt | |
end # []= | |
end # MyHash | |
h = MyHash.new | |
h[:hello] = 5, :opt => true | |
# ./test.rb:12: syntax error, unexpected =>, expecting end-of-input | |
# h[:hello] = 5, :opt => true | |
# ^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment