stdlib/json.rb in opal-1.1.1 vs stdlib/json.rb in opal-1.2.0.beta1

- old
+ new

@@ -184,10 +184,12 @@ `self.toString()` end end class String - alias to_json inspect + def to_json + `JSON.stringify(self)` + end end class Time def to_json strftime('%FT%T%z').to_json