lsegal / yard

YARD is a Ruby Documentation tool. The Y stands for "Yay!"
http://yardoc.org
MIT License
1.94k stars 397 forks source link

ruby3.3 causes failure for YARD::Parser::SourceParser#parse understands UTF-8 BOM #1509

Closed mtasaka closed 1 year ago

mtasaka commented 1 year ago

With ruby 3.3 (I tested https://github.com/ruby/ruby/commit/2ceb5363f9b15cffd3901220463a1175a32b89f7 ) yard 0.9.34 ( https://github.com/lsegal/yard/commit/698b22cc2340230856ab17a25cfefa889f1c8289 ) spec testsuite fails like:

$ rspec -r spec_helper spec

Failures:

  1) YARD::Parser::SourceParser#parse understands UTF-8 BOM
     Failure/Error: expect(Registry.all(:class).first.path).to eq "FooBar"

       expected: "FooBar"
            got: "FooBa"

       (compared using ==)
     # ./spec/parser/source_parser_spec.rb:589:in `block (4 levels) in <top (required)>'
     # ./spec/spec_helper.rb:129:in `block (2 levels) in <top (required)>'

ruby 3.2.2 does not see this error. For now I don't know what ruby side change caused this.

MSP-Greg commented 1 year ago

@mtasaka

I verified the error on both Ubuntu 22.04 & Windows, using master of YARD and Ruby master versions as of today.

I believe #1510 fixes it. My systems are US-EN, so if you can check it locally, it would be appreciated...

mtasaka commented 1 year ago

Yes, #1510 fixes this. Thank you.