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

Unparser fails with begin/rescue statement #4

Closed
dkubb opened this issue Jul 28, 2013 · 1 comment
Closed

Unparser fails with begin/rescue statement #4

dkubb opened this issue Jul 28, 2013 · 1 comment

Comments

@dkubb
Copy link
Collaborator

dkubb commented Jul 28, 2013

I was writing a spec for mutant and I saw that a begin/rescue statement was causing an error in unparser, eg:

Unparser.unparse(Parser::CurrentRuby.parse('begin; rescue Exception => e; end'))

The partial stack trace is:

     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter.rb:316:in `visit_indented'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter/rescue.rb:19:in `dispatch'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter.rb:102:in `initialize'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/abstract_type-0.0.6/lib/abstract_type.rb:38:in `new'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/abstract_type-0.0.6/lib/abstract_type.rb:38:in `new'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/adamantium-0.0.11/lib/adamantium/class_methods.rb:17:in `new'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter.rb:87:in `emit'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter.rb:121:in `visit'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter.rb:192:in `visit'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter/begin.rb:21:in `block in emit_inner'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter/begin.rb:20:in `each'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter/begin.rb:20:in `each_with_index'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter/begin.rb:20:in `emit_inner'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter/begin.rb:90:in `emit_body'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter/begin.rb:78:in `dispatch'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter.rb:102:in `initialize'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/abstract_type-0.0.6/lib/abstract_type.rb:38:in `new'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/abstract_type-0.0.6/lib/abstract_type.rb:38:in `new'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/adamantium-0.0.11/lib/adamantium/class_methods.rb:17:in `new'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter.rb:87:in `emit'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser/emitter.rb:121:in `visit'
     # /Users/dkubb/.rvm/gems/ruby-2.0.0-p247@axiom-types/gems/unparser-0.0.10/lib/unparser.rb:23:in `unparse'
@mbj
Copy link
Owner

mbj commented Jul 28, 2013

@dkubb Fixed in released version 0.0.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants