Project

General

Profile

Feature #22252 ยป rtest.rb

getajobmike (Mike Perham), 08/19/2026 05:46 PM

 
module A
def hello
puts "Hello"
end

define_method(:hi) do |*args, **kwargs|
puts "hi"
end

class_eval(<<~RUBY, __FILE__, __LINE__ + 1)
def ahoy(*args, **kwargs)
puts "ahoy"
end
RUBY
end


class B
include A
end

b = B.new
b.hello
b.ahoy
b.hi

r = Ractor.new do
b2 = B.new
b2.hello
b2.ahoy
b2.hi
end
r.join
    (1-1/1)