mirror of
https://github.com/rubyjs/therubyrhino
synced 2023-03-27 23:21:34 -04:00
inspect seems to print non-sense for native rhino objects
This commit is contained in:
parent
6c962f7db0
commit
9e872e7d36
1 changed files with 7 additions and 0 deletions
|
@ -85,6 +85,13 @@ class Java::OrgMozillaJavascript::ScriptableObject
|
|||
to_h.to_json(*args)
|
||||
end
|
||||
|
||||
# make sure inspect prints the same as to_s (on --1.8)
|
||||
# otherwise JRuby might play it a little smart e.g. :
|
||||
# "#<#<Class:0xd790a8>:0x557c15>" instead of "Error: bar"
|
||||
def inspect
|
||||
toString
|
||||
end
|
||||
|
||||
# Delegate methods to JS object if possible when called from Ruby.
|
||||
def method_missing(name, *args)
|
||||
name_str = name.to_s
|
||||
|
|
Loading…
Reference in a new issue