[ruby-core:125467] [Ruby Bug#22065] `make rdoc` fails with `invalid byte sequence in US-ASCII` on Ruby 4.0.4 under C locale
Issue #22065 has been reported by hsbt (Hiroshi SHIBATA). ---------------------------------------- Bug #22065: `make rdoc` fails with `invalid byte sequence in US-ASCII` on Ruby 4.0.4 under C locale https://bugs.ruby-lang.org/issues/22065 * Author: hsbt (Hiroshi SHIBATA) * Status: Open * Backport: 3.3: DONTNEED, 3.4: DONTNEED, 4.0: REQUIRED ---------------------------------------- Building Ruby 4.0.4 in an environment where `Encoding.default_external` is `US-ASCII` (e.g. a Docker container with `LC_ALL=C`) fails while documenting `object.c`: ``` (ArgumentError) invalid byte sequence in US-ASCII .bundle/gems/rdoc-7.0.3/lib/rdoc/parser/c.rb:575:in 'String#scan' from .../parser/c.rb:600:in 'RDoc::Parser::C#find_body' from .../parser/c.rb:1025:in 'RDoc::Parser::C#handle_method' ``` https://github.com/ruby/all-ruby/actions/runs/25707463525/job/75480556963#st... 4.0.3 is not affected. The trigger is [`2b22593ac1`](https://github.com/ruby/ruby/commit/2b22593ac1) (backport of master [`a2531ba293`](https://github.com/ruby/ruby/commit/a2531ba293)), which introduced two U+2192 `→` characters in `class.c` comments. RDoc couldn't parse that. `master` branch is unaffected because the RDoc-side bug was fixed in [ruby/rdoc#1657](https://github.com/ruby/rdoc/pull/1657) (commit [`911b122a`](https://github.com/ruby/rdoc/commit/911b122a)) and pulled into Ruby master via [`3f75e99961`](https://github.com/ruby/ruby/commit/3f75e99961). The bump was not backported to `ruby_4_0`, which still ships RDoc 7.0.3. Workaround: build with `LC_ALL=C.UTF-8` or use `--disable-install-doc` option. Four resolutions are under discussion with @k0kubun 1. replace `→` with `->` in `class.c` and backport it. 2. bump the bundled RDoc to 7.2.0 in Ruby 4.0.5 3. Release RDoc 7.0.4 containing [`911b122a`](https://github.com/ruby/rdoc/commit/911b122a) and then bump in Ruby 4.0.5 4. Treat the C locale or build option as a user-side configuration issue and document the workaround. -- https://bugs.ruby-lang.org/
Issue #22065 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.3: DONTNEED, 3.4: DONTNEED, 4.0: REQUIRED to 3.3: DONTNEED, 3.4: DONTNEED, 4.0: DONE ruby_4_0 commit:4e54008562e2e87d1c63f79e4a51d7089403bc35. ---------------------------------------- Bug #22065: `make rdoc` fails with `invalid byte sequence in US-ASCII` on Ruby 4.0.4 under C locale https://bugs.ruby-lang.org/issues/22065#change-117275 * Author: hsbt (Hiroshi SHIBATA) * Status: Closed * Backport: 3.3: DONTNEED, 3.4: DONTNEED, 4.0: DONE ---------------------------------------- Building Ruby 4.0.4 in an environment where `Encoding.default_external` is `US-ASCII` (e.g. a Docker container with `LC_ALL=C`) fails while documenting `object.c`: ``` (ArgumentError) invalid byte sequence in US-ASCII .bundle/gems/rdoc-7.0.3/lib/rdoc/parser/c.rb:575:in 'String#scan' from .../parser/c.rb:600:in 'RDoc::Parser::C#find_body' from .../parser/c.rb:1025:in 'RDoc::Parser::C#handle_method' ``` https://github.com/ruby/all-ruby/actions/runs/25707463525/job/75480556963#st... 4.0.3 is not affected. The trigger is [`2b22593ac1`](https://github.com/ruby/ruby/commit/2b22593ac1) (backport of master [`a2531ba293`](https://github.com/ruby/ruby/commit/a2531ba293)), which introduced two U+2192 `→` characters in `class.c` comments. RDoc couldn't parse that. `master` branch is unaffected because the RDoc-side bug was fixed in [ruby/rdoc#1657](https://github.com/ruby/rdoc/pull/1657) (commit [`911b122a`](https://github.com/ruby/rdoc/commit/911b122a)) and pulled into Ruby master via [`3f75e99961`](https://github.com/ruby/ruby/commit/3f75e99961). The bump was not backported to `ruby_4_0`, which still ships RDoc 7.0.3. Workaround: build with `LC_ALL=C.UTF-8` or use `--disable-install-doc` option. Four resolutions are under discussion with @k0kubun 1. replace `→` with `->` in `class.c` and backport it. 2. bump the bundled RDoc to 7.2.0 in Ruby 4.0.5 3. Release RDoc 7.0.4 containing [`911b122a`](https://github.com/ruby/rdoc/commit/911b122a) and then bump in Ruby 4.0.5 4. Treat the C locale or build option as a user-side configuration issue and document the workaround. -- https://bugs.ruby-lang.org/
Issue #22065 has been updated by Eregon (Benoit Daloze). Should there be a test catching this kind of issue, by doing exactly the steps a user would to compile Ruby, and with LC_ALL=C? ---------------------------------------- Bug #22065: `make rdoc` fails with `invalid byte sequence in US-ASCII` on Ruby 4.0.4 under C locale https://bugs.ruby-lang.org/issues/22065#change-117311 * Author: hsbt (Hiroshi SHIBATA) * Status: Closed * Backport: 3.3: DONTNEED, 3.4: DONTNEED, 4.0: DONE ---------------------------------------- Building Ruby 4.0.4 in an environment where `Encoding.default_external` is `US-ASCII` (e.g. a Docker container with `LC_ALL=C`) fails while documenting `object.c`: ``` (ArgumentError) invalid byte sequence in US-ASCII .bundle/gems/rdoc-7.0.3/lib/rdoc/parser/c.rb:575:in 'String#scan' from .../parser/c.rb:600:in 'RDoc::Parser::C#find_body' from .../parser/c.rb:1025:in 'RDoc::Parser::C#handle_method' ``` https://github.com/ruby/all-ruby/actions/runs/25707463525/job/75480556963#st... 4.0.3 is not affected. The trigger is [`2b22593ac1`](https://github.com/ruby/ruby/commit/2b22593ac1) (backport of master [`a2531ba293`](https://github.com/ruby/ruby/commit/a2531ba293)), which introduced two U+2192 `→` characters in `class.c` comments. RDoc couldn't parse that. `master` branch is unaffected because the RDoc-side bug was fixed in [ruby/rdoc#1657](https://github.com/ruby/rdoc/pull/1657) (commit [`911b122a`](https://github.com/ruby/rdoc/commit/911b122a)) and pulled into Ruby master via [`3f75e99961`](https://github.com/ruby/ruby/commit/3f75e99961). The bump was not backported to `ruby_4_0`, which still ships RDoc 7.0.3. Workaround: build with `LC_ALL=C.UTF-8` or use `--disable-install-doc` option. Four resolutions are under discussion with @k0kubun 1. replace `→` with `->` in `class.c` and backport it. 2. bump the bundled RDoc to 7.2.0 in Ruby 4.0.5 3. Release RDoc 7.0.4 containing [`911b122a`](https://github.com/ruby/rdoc/commit/911b122a) and then bump in Ruby 4.0.5 4. Treat the C locale or build option as a user-side configuration issue and document the workaround. -- https://bugs.ruby-lang.org/
participants (3)
-
Eregon (Benoit Daloze) -
hsbt (Hiroshi SHIBATA) -
k0kubun (Takashi Kokubun)