summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2020-11-05 18:08:04 +0100
committeraycabta <[email protected]>2020-11-22 21:00:11 +0900
commitafb8aba4af923350cfe0a0ae4b4895d5a837e799 ()
treede6c9f3b68e23e9008647e2d28b837700eb49e0c
parent5218f17737594867ffe5c2cd9c90b19c7378af05 (diff)
[ruby/irb] Add a fallback for check_code_block that does not depend on implementation-private APIs
* Fixes https://.com/ruby/irb/issues/133 https://.com/ruby/irb/commit/5eb3ef3293
-rw-r--r--lib/irb/ruby-lex.rb9
1 files changed, 7 insertions, 2 deletions
@@ -222,11 +222,16 @@ class RubyLex
begin # check if parser error are available
verbose, $VERBOSE = $VERBOSE, nil
case RUBY_ENGINE
when 'jruby'
JRuby.compile_ir(code)
else
- self.class.compile_with_errors_suppressed(code) do |inner_code, line_no|
- RubyVM::InstructionSequence.compile(inner_code, nil, nil, line_no)
end
end
rescue EncodingError