jbarnette / johnson

Johnson wraps JavaScript in a loving Ruby embrace.
http://github.com/jbarnette/johnson/wikis
464 stars 33 forks source link

quit() doesn't work #42

Open whoward opened 13 years ago

whoward commented 13 years ago

Seems like any way I try to call quit() it produces the same stack trace.

I'm running Johnson 1.2.0

$ johnson -e "quit(42)"
__noSuchMethod__("exit",[object Array])@:0: #<SystemExit: exit> at (none):25 (Johnson::Error)
    from quit(42)@none:25
    from @-e:1
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/lib/johnson/spidermonkey/js_land_proxy.rb:16:in `evaluate_compiled_script_without_clearing_traps'
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/lib/johnson/spidermonkey/runtime.rb:36:in `evaluate_compiled_script'
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/lib/johnson/runtime.rb:77:in `evaluate'
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/bin/johnson:59
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/bin/johnson:59:in `each'
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/bin/johnson:59
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/bin/johnson:19:in `load'
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/bin/johnson:19
$ johnson -e "Ruby.exit(42)"
__noSuchMethod__("exit",[object Array])@:0: #<SystemExit: exit> at (-e):1 (Johnson::Error)
    from @-e:1
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/lib/johnson/spidermonkey/js_land_proxy.rb:16:in `evaluate_compiled_script_without_clearing_traps'
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/lib/johnson/spidermonkey/runtime.rb:36:in `evaluate_compiled_script'
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/lib/johnson/runtime.rb:77:in `evaluate'
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/bin/johnson:59
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/bin/johnson:59:in `each'
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/gems/johnson-1.2.0/bin/johnson:59
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/bin/johnson:19:in `load'
    from /home/will/.rvm/gems/ree-1.8.7-2010.02@bridge-dev/bin/johnson:19
najamkhn commented 12 years ago

Well, if you're in js shell then try js> quit and if you're in ruby shell, try rb> exit(status_code)