ruby-changes:63524
From: Marc-Andre <ko1@a...>
Date: Thu, 5 Nov 2020 07:52:25 +0900 (JST)
Subject: [ruby-changes:63524] 6f24be8565 (master): Revert "Make `marshal_load` public"
https://git.ruby-lang.org/ruby.git/commit/?id=6f24be8565 From 6f24be856502aba8fa984e704c1e81aa12d96fc9 Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune <github@m...> Date: Wed, 4 Nov 2020 16:01:37 -0500 Subject: Revert "Make `marshal_load` public" This reverts commit ee7cc6ac35cfb056b3946b1dcd6d4d5a140ccacf. I'm not sure I agree with the spec, but I just tweaked it. diff --git a/lib/ostruct.rb b/lib/ostruct.rb index d7ff0f6..823c829 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -203,7 +203,6 @@ class OpenStruct https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb#L203 # Provides marshalling support for use by the Marshal library. # alias_method :marshal_load, :update_to_values! # :nodoc: - public :marshal_load # # Used internally to defined properties on the diff --git a/spec/ruby/library/openstruct/marshal_load_spec.rb b/spec/ruby/library/openstruct/marshal_load_spec.rb index e07c4ce..342e5e6 100644 --- a/spec/ruby/library/openstruct/marshal_load_spec.rb +++ b/spec/ruby/library/openstruct/marshal_load_spec.rb @@ -4,7 +4,7 @@ require "ostruct" https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/openstruct/marshal_load_spec.rb#L4 describe "OpenStruct#marshal_load when passed [Hash]" do it "defines methods based on the passed Hash" do os = OpenStruct.new - os.marshal_load(age: 20, name: "John") + os.send :marshal_load, age: 20, name: "John" os.age.should eql(20) os.name.should == "John" -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/