Skip to content

Commit

Permalink
- On failure (eg ruby 2.0), fall back to compound RubyParser instance…
Browse files Browse the repository at this point in the history
… for 2nd & 3rd order testing

[git-p4: depot-paths = "//src/ruby2ruby/dev/": change = 8160]
  • Loading branch information
zenspider committed Jan 30, 2013
1 parent d8ae6c4 commit 879b25d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_ruby2ruby.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def silent_eval ruby
end end


def morph_and_eval src, from, to, processor def morph_and_eval src, from, to, processor
parser = RubyParser.for_current_ruby parser = RubyParser.for_current_ruby rescue RubyParser.new
new_src = processor.new.process(parser.process(src.sub(from, to))) new_src = processor.new.process(parser.process(src.sub(from, to)))


silent_eval new_src silent_eval new_src
Expand Down

0 comments on commit 879b25d

Please sign in to comment.