diff options
author | Ryan Fitzgerald <rwfitzge@gmail.com> | 2013-07-27 14:55:38 -0700 |
---|---|---|
committer | Ryan Fitzgerald <rwfitzge@gmail.com> | 2013-07-27 14:55:38 -0700 |
commit | 8083e124d1c336fb0563fa9a2deec592762f13c4 (patch) | |
tree | 53c5957782014445aa9edce329f0b92de3332eae /lib/method_source/code_helpers.rb | |
parent | 06f9ee6626f3dd5a5fab98b4c6eeefb1432e5eca (diff) | |
download | method_source-8083e124d1c336fb0563fa9a2deec592762f13c4.tar.gz |
Be more careful about separating out the rbx-only regexes
Diffstat (limited to 'lib/method_source/code_helpers.rb')
-rw-r--r-- | lib/method_source/code_helpers.rb | 12 |
1 files 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 |