Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when a method contains multiple ivar assignments #15

Closed
presidentbeef opened this issue Mar 30, 2013 · 1 comment
Closed

Error when a method contains multiple ivar assignments #15

presidentbeef opened this issue Mar 30, 2013 · 1 comment
Assignees

Comments

@presidentbeef
Copy link

Looks like this is related to the fix for #14.

def a
  @y = 1
  @z = 2
end
$ r2r_show test.rb
malloc_limit=50000000 (8000000)
heap_min_slots=500000 (10000)
/Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/sexp_processor-4.2.0/lib/sexp.rb:173:in `find_node': multiple nodes for iasgn were found in s(:a, s(:args), s(:iasgn, :@y, s(:lit, 1)), s(:iasgn, :@z, s(:lit, 2))) (NoMethodError)
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/sexp_processor-4.2.0/lib/sexp.rb:209:in `method_missing'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/ruby2ruby-2.0.4/lib/ruby2ruby.rb:336:in `process_defn'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/sexp_processor-4.2.0/lib/sexp_processor.rb:218:in `block (2 levels) in process'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/sexp_processor-4.2.0/lib/sexp_processor.rb:275:in `error_handler'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/sexp_processor-4.2.0/lib/sexp_processor.rb:217:in `block in process'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/sexp_processor-4.2.0/lib/sexp_processor.rb:340:in `in_context'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/sexp_processor-4.2.0/lib/sexp_processor.rb:194:in `process'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/ruby2ruby-2.0.4/bin/r2r_show:31:in `block in <top (required)>'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/ruby2ruby-2.0.4/bin/r2r_show:24:in `each'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/gems/ruby2ruby-2.0.4/bin/r2r_show:24:in `<top (required)>'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/bin/r2r_show:23:in `load'
    from /Users/collins/.rvm/gems/ruby-1.9.3-p392@WHATEVS/bin/r2r_show:23:in `<main>'
@zenspider
Copy link
Member

True for ivar & iasgn. Fixed by checking the overall size of the body.

Thanks!

@seattlerb seattlerb locked and limited conversation to collaborators Jan 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants