Ripper on 9.0.x.x wrongly reports line number 2 for sexp or token at line 1.
[1] pry(main)> JRUBY_VERSION
=> "9.0.1.0"
[2] pry(main)> require 'ripper'
=> true
[3] pry(main)> Ripper.sexp('foo')
=> [:program, [[:vcall, [:@ident, "foo", [2, 0]]]]]
[4] pry(main)> Ripper.lex('foo')
=> [[[2, 0], :on_ident, "foo"]]
FYI Ripper on 1.7.22 correctly reports it as line 1.