mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert "Make marshal_load
public"
This reverts commit ee7cc6ac35
.
I'm not sure I agree with the spec, but I just tweaked it.
This commit is contained in:
parent
9232f91827
commit
6f24be8565
Notes:
git
2020-11-05 07:52:32 +09:00
2 changed files with 1 additions and 2 deletions
|
@ -203,7 +203,6 @@ class OpenStruct
|
|||
# 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
|
||||
|
|
|
@ -4,7 +4,7 @@ require "ostruct"
|
|||
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"
|
||||
|
|
Loading…
Reference in a new issue