Improvementsโ
Add JSON Literalโ
It is now possible to parse a string via the JSON
literal and creating an RocketLang object (array or hash) from it.
๐ > JSON.parse('{"test": 123}')
=> {"test": 123.0}
๐ > JSON.parse('["test", 123]')
=> ["test", 123.0]
See JSON for more information.
Support for Single Quotes ('
)โ
You can now use single-quotes to create a string additionally to the already existing double-quotes. This allows more flexibility in creating rich content like json.
'test "string" with doublequotes'
Escape double-quotes in double-quoted stringโ
This feature is in an early beta stage and does not support other escape sequences
Inside a string created with double-quotes "
you can escape a single double-quote to create strings more flexible.
"te\"st" == 'te"st'
Removedโ
next and break argumentโ
This version removes the ability in break and next to submit an argument as it did not work reliable and intuitive.
In order to update your program to this version you need to make the following adjustments:
foreach i in 5
if (i == 2)
next(i)
end
puts(i)
end
foreach i in 5
if (i == 2)
break(i)
end
puts(i)
end
needs to change to:
foreach i in 5
if (i == 2)
next
end
puts(i)
end
foreach i in 5
if (i == 2)
break
end
puts(i)
end