Project

General

Profile

Actions

Bug #22293

open

`String#unicode_normalize` does not work in non-main Ractor

Bug #22293: `String#unicode_normalize` does not work in non-main Ractor

Added by nobu (Nobuyoshi Nakada) 3 days ago.

Status:
Open
Target version:
-
[ruby-core:126572]

Description

This fails consistently since Ruby 3.0 (except for using #take instead of #value).

$ ruby -v -W:no-ex -e 'p Ractor.new{"aaa".unicode_normalize}.value'
ruby 4.1.0dev (2026-09-04T13:17:34Z master 3643154e6d) +PRISM [arm64-darwin25]
#<Thread:0x0000000123bf0008 run> terminated with exception (report_on_exception is true):
/opt/local/lib/ruby/4.1.0+4/unicode_normalize/normalize.rb:138:in 'UnicodeNormalize.normalize': can not access non-shareable objects in constant UnicodeNormalize::NF_HASH_C by non-main ractor. (Ractor::IsolationError)
	from -e:1:in 'String#unicode_normalize'
	from -e:1:in 'block in <main>'
-e:1:in 'Ractor#value': thrown by remote Ractor. (Ractor::RemoteError)
	from -e:1:in '<main>'
/opt/local/lib/ruby/4.1.0+4/unicode_normalize/normalize.rb:138:in 'UnicodeNormalize.normalize': can not access non-shareable objects in constant UnicodeNormalize::NF_HASH_C by non-main ractor. (Ractor::IsolationError)
	from -e:1:in 'String#unicode_normalize'
	from -e:1:in 'block in <main>'

No data to display

Actions

Also available in: PDF Atom