Created
February 26, 2017 00:35
-
-
Save otaconix/5f77162f9620b6415c369bf2cb2ac178 to your computer and use it in GitHub Desktop.
Works in Io REPL, doesn't in doFile()
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
OperatorTable addAssignOperator("=>", "atPutRemoveQuotes") | |
curlyBrackets := method( | |
r := Map clone; | |
call message arguments foreach(arg, r doMessage(arg)); | |
r | |
) | |
Map atPutRemoveQuotes := method( | |
self atPut( | |
call evalArgAt(0) asMutable removePrefix("\"") removeSuffix("\""), | |
call evalArgAt(1))) | |
{"Hello" => "world"} serialized println |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well, turns out I'm not the only one running into this, see this answer on StackOverflow.