Environment Information
Provide at least:
- JRuby version: jruby 10.1.1.0 (4.0.0) 2026-07-22 aaa95d5 OpenJDK 64-Bit Server VM 24.0.1+9-30 on 24.0.1+9-30 +indy +jit [x86_64-darwin]
Expected Behavior
the following script works with no issues in cruby:
class A; end
module B; end
A.freeze
# A.extend B fails expectedly
dupped = A.dup
dupped.frozen? #=> false
dupped.extend B
Actual Behavior
In jruby, the last line of the script above fails with the error:
org/jruby/RubyModule.java:1741:in 'include': can't modify frozen module: #<Class:C> (FrozenError)
from org/jruby/RubyModule.java:3780:in 'extend_object'
from org/jruby/RubyKernel.java:2564:in 'extend'
Environment Information
Provide at least:
Expected Behavior
the following script works with no issues in cruby:
Actual Behavior
In jruby, the last line of the script above fails with the error: