module MethodSource::CodeHelpers::IncompleteExpression
An exception matcher that matches only subsets of SyntaxErrors that can be fixed by adding more input to the buffer.
Constants
- GENERIC_REGEXPS
- RBX_ONLY_REGEXPS
Public Class Methods
Source
# File lib/method_source/code_helpers.rb, line 137 def self.===(ex) return false unless SyntaxError === ex case ex.message when *GENERIC_REGEXPS true when *RBX_ONLY_REGEXPS rbx? else false end end
Source
# File lib/method_source/code_helpers.rb, line 149 def self.rbx? RbConfig::CONFIG['ruby_install_name'] == 'rbx' end