Parser not evaling -1 like MRI in IRB #1642

Closed
jc00ke opened this Issue Mar 30, 2012 · 2 comments

Comments

Projects
None yet
2 participants
Owner

jc00ke commented Mar 30, 2012

I noticed this when running jekyll server in the web/ dir, and it can be reproduced as follows:

In IRB

foo = 10
bar = 5
{ 'baz' => foo - bar -1 }

CRuby will report

{"baz"=>4}

while rbx will throw a SyntaxError

SyntaxError: expecting keyword_do or '{' or '('
    from /home/jesse/.rvm/rubies/rbx-head/runtime/19/melbourne.rbc:68:in `syntax_error'
    from /home/jesse/.rvm/rubies/rbx-head/runtime/19/melbourne.rbc:75:in `parse_string'
    from /home/jesse/.rvm/rubies/rbx-head/runtime/19/compiler/stages.rbc:251:in `parse'
    from /home/jesse/.rvm/rubies/rbx-head/runtime/19/compiler/stages.rbc:217:in `run'
    from /home/jesse/.rvm/rubies/rbx-head/runtime/19/compiler/compiler.rbc:370:in `run'
    from /home/jesse/.rvm/rubies/rbx-head/runtime/19/compiler/compiler.rbc:298:in `compile_eval'
    from /home/jesse/.rvm/rubies/rbx-head/runtime/19/compiler/compiler.rbc:310:in `construct_block'
    from kernel/common/eval.rb:67:in `eval'
    from kernel/common/kernel19.rb:44:in `loop'
    from kernel/common/throw_catch19.rb:8:in `catch'
    from kernel/common/throw_catch.rb:10:in `register'
    from kernel/common/throw_catch19.rb:7:in `catch'
    from kernel/common/throw_catch19.rb:8:in `catch'
    from kernel/common/throw_catch.rb:10:in `register'
    from kernel/common/throw_catch19.rb:7:in `catch'
    from kernel/delta/codeloader.rb:67:in `load_script'
    from kernel/delta/codeloader.rb:109:in `load_script'
    from kernel/loader.rb:632:in `script'
    from kernel/loader.rb:836:in `main'>> 

Original error is from Liquid

Member

ileitch commented Mar 30, 2012

Looks the same as #1614

Owner

jc00ke commented Mar 30, 2012

@ileitch you are correct sir!

jc00ke closed this Mar 30, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment