From 8083e124d1c336fb0563fa9a2deec592762f13c4 Mon Sep 17 00:00:00 2001 From: Ryan Fitzgerald Date: Sat, 27 Jul 2013 14:55:38 -0700 Subject: Be more careful about separating out the rbx-only regexes --- lib/method_source/code_helpers.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/method_source/code_helpers.rb b/lib/method_source/code_helpers.rb index d555f5a..6c1d53e 100644 --- a/lib/method_source/code_helpers.rb +++ b/lib/method_source/code_helpers.rb @@ -125,13 +125,13 @@ module MethodSource GENERIC_REGEXPS = [ /unexpected (\$end|end-of-file|end-of-input|END_OF_FILE)/, # mri, jruby, ruby-2.0, ironruby /embedded document meets end of file/, # =begin - /unterminated (quoted string|string|regexp) meets end of file/ # "quoted string" is ironruby + /unterminated (quoted string|string|regexp) meets end of file/, # "quoted string" is ironruby + /can't find string ".*" anywhere before EOF/, # rbx and jruby + /missing 'end' for/, /expecting kWHEN/ # rbx ] - RBX_REGEXPS = [ - /missing 'end' for/, /expecting '[})\]]'(?:$|:)/, - /can't find string ".*" anywhere before EOF/, /expecting keyword_end/, - /expecting kWHEN/ + RBX_ONLY_REGEXPS = [ + /expecting '[})\]]'(?:$|:)/, /expecting keyword_end/ ] def self.===(ex) @@ -139,7 +139,7 @@ module MethodSource case ex.message when *GENERIC_REGEXPS true - when *RBX_REGEXPS + when *RBX_ONLY_REGEXPS rbx? else false -- cgit v1.2.1