diff --git a/lib/yard/parser/ruby/legacy/ruby_lex.rb b/lib/yard/parser/ruby/legacy/ruby_lex.rb index 40f805ff0..2f139d0d5 100644 --- a/lib/yard/parser/ruby/legacy/ruby_lex.rb +++ b/lib/yard/parser/ruby/legacy/ruby_lex.rb @@ -978,7 +978,7 @@ def identify_gvar end def identify_identifier - token = "" + token = String.new(encoding: Encoding::UTF_8) token.concat getc if peek(0) =~ /[$@]/ token.concat getc if peek(0) == "@"