[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 nobu@ruby-lang.org
https://github.com/ruby/irb/commit/e593cc65b7
[ruby/irb] Simplify RubyLex.compile_with_errors_suppressed
nobu-san reviewed,
https://github.com/ruby/irb/pull/106#pullrequestreview-423400033
I employ the way.
Co-authored-by: Nobuyoshi Nakada nobu@ruby-lang.org
https://github.com/ruby/irb/commit/e593cc65b7