Skip to content

Instantly share code, notes, and snippets.

@otaconix
Created February 26, 2017 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otaconix/5f77162f9620b6415c369bf2cb2ac178 to your computer and use it in GitHub Desktop.
Save otaconix/5f77162f9620b6415c369bf2cb2ac178 to your computer and use it in GitHub Desktop.
Works in Io REPL, doesn't in doFile()
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
@otaconix
Copy link
Author

Well, turns out I'm not the only one running into this, see this answer on StackOverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment