Project

General

Profile

« Previous | Next » 

Revision c72a2fad

Added by aycabta (aycabta .) over 5 years ago

[ruby/irb] Simplify RubyLex.compile_with_errors_suppressed

nobu-san reviewed,

https://github.com/ruby/irb/pull/106#pullrequestreview-423400033

How about lexer = Ripper::Lexer.new(";\n#{code}", nil, 0)?
Encoding pragma is effective only at the beginning.
And the semicolon and newline will be skipped because the position is before
the initial pos.

I employ the way.

Co-authored-by: Nobuyoshi Nakada

https://github.com/ruby/irb/commit/e593cc65b7