Skip to content

Commit

Permalink
Fix JSON.from_object() to use options hash
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Oct 26, 2013
1 parent 89296d5 commit 2dd4437
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stdlib/json.rb
Expand Up @@ -78,7 +78,8 @@ def self.parse!(source, options = {})

# Raw js object => opal object
def self.from_object(js_object)
`to_opal(js_object)`
options = { :object_class => Hash, :array_class => Array }
`to_opal(js_object, options)`
end

def self.generate(obj, options = {})
Expand Down

0 comments on commit 2dd4437

Please sign in to comment.