1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/psych] Avoid methods depending on bindings

Improves Ractor-readiness.
This commit is contained in:
Marc-Andre Lafortune 2020-12-20 21:41:02 -05:00 committed by Marc-André Lafortune
parent 0eb94dae4a
commit d1963adae8
Notes: git 2020-12-23 15:09:03 +09:00

View file

@ -35,9 +35,11 @@ module Psych
constants.each do |const|
konst = const_get const
define_method(const.to_s.downcase) do
load konst
end
class_eval <<~RUBY
def #{const.to_s.downcase}
load #{konst.inspect}
end
RUBY
end
private