[ruby/psych] Revert "Alias value or join to take in old Ruby"
This reverts commit https://github.com/ruby/psych/commit/1a4d383efe0b. https://github.com/ruby/psych/commit/2f51c02280
This commit is contained in:
parent
a88ff32559
commit
6b7e3395a4
@ -4,10 +4,6 @@ require_relative 'helper'
|
|||||||
class TestPsychRactor < Test::Unit::TestCase
|
class TestPsychRactor < Test::Unit::TestCase
|
||||||
def test_ractor_round_trip
|
def test_ractor_round_trip
|
||||||
assert_ractor(<<~RUBY, require_relative: 'helper')
|
assert_ractor(<<~RUBY, require_relative: 'helper')
|
||||||
class Ractor
|
|
||||||
alias value take
|
|
||||||
end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders
|
|
||||||
|
|
||||||
obj = {foo: [42]}
|
obj = {foo: [42]}
|
||||||
obj2 = Ractor.new(obj) do |obj|
|
obj2 = Ractor.new(obj) do |obj|
|
||||||
Psych.unsafe_load(Psych.dump(obj))
|
Psych.unsafe_load(Psych.dump(obj))
|
||||||
@ -32,10 +28,6 @@ class TestPsychRactor < Test::Unit::TestCase
|
|||||||
# Test is to make sure it works, even though usage is probably very low.
|
# Test is to make sure it works, even though usage is probably very low.
|
||||||
# The methods are not documented and might be deprecated one day
|
# The methods are not documented and might be deprecated one day
|
||||||
assert_ractor(<<~RUBY, require_relative: 'helper')
|
assert_ractor(<<~RUBY, require_relative: 'helper')
|
||||||
class Ractor
|
|
||||||
alias value take
|
|
||||||
end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders
|
|
||||||
|
|
||||||
r = Ractor.new do
|
r = Ractor.new do
|
||||||
Psych.add_builtin_type 'omap' do |type, val|
|
Psych.add_builtin_type 'omap' do |type, val|
|
||||||
val * 2
|
val * 2
|
||||||
@ -49,10 +41,6 @@ class TestPsychRactor < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_ractor_constants
|
def test_ractor_constants
|
||||||
assert_ractor(<<~RUBY, require_relative: 'helper')
|
assert_ractor(<<~RUBY, require_relative: 'helper')
|
||||||
class Ractor
|
|
||||||
alias value take
|
|
||||||
end unless Ractor.method_defined? :value # compat with Ruby 3.4 and olders
|
|
||||||
|
|
||||||
r = Ractor.new do
|
r = Ractor.new do
|
||||||
Psych.libyaml_version.join('.') == Psych::LIBYAML_VERSION
|
Psych.libyaml_version.join('.') == Psych::LIBYAML_VERSION
|
||||||
end.value
|
end.value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user