You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ruby allows you to define a method with non-ASCII characters, but RBS doesn't.
The following code in Ruby is valid.
defこんにちはend
But RBS raises an error with the following RBS code.
# It is invalid as RBSclassAdef こんにちは: () -> untypedend
$ rbs parse test.rbs
parser.y:1373:in `next_token': Unexpected token: こんに�... (RuntimeError) from (eval):3:in `_racc_do_parse_c' from (eval):3:in `do_parse' from parser.y:1108:in `parse_signature'
from /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/3.0.0/gems/rbs-0.14.0/lib/rbs/cli.rb:739:in `block (2 levels) in run_parse' from /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/3.0.0/gems/rbs-0.14.0/lib/rbs/environment_loader.rb:81:in `each_signature' from /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/3.0.0/gems/rbs-0.14.0/lib/rbs/cli.rb:738:in `block in run_parse' from /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/3.0.0/gems/rbs-0.14.0/lib/rbs/cli.rb:736:in `each'
from /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/3.0.0/gems/rbs-0.14.0/lib/rbs/cli.rb:736:in `run_parse' from /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/3.0.0/gems/rbs-0.14.0/lib/rbs/cli.rb:98:in `run' from /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/3.0.0/gems/rbs-0.14.0/exe/rbs:7:in `<top (required)>' from /home/pocke/.rbenv/versions/trunk/bin/rbs:23:in `load'
from /home/pocke/.rbenv/versions/trunk/bin/rbs:23:in `<main>'
I actually define some method in Japanese, so rbs prototype rb generates RBSs with Japanese method name, and they're not valid.
We can define a method with non-ASCII, so I think RBS should allow also.
And, I guess RBS has the same problem for other identifiers, such as class, constants, etc.
The text was updated successfully, but these errors were encountered:
Ruby allows you to define a method with non-ASCII characters, but RBS doesn't.
The following code in Ruby is valid.
But RBS raises an error with the following RBS code.
I actually define some method in Japanese, so
rbs prototype rb
generates RBSs with Japanese method name, and they're not valid.We can define a method with non-ASCII, so I think RBS should allow also.
And, I guess RBS has the same problem for other identifiers, such as class, constants, etc.
The text was updated successfully, but these errors were encountered: