diff --git a/lib/ostruct.rb b/lib/ostruct.rb index d7ff0f630d..823c829d54 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -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 diff --git a/spec/ruby/library/openstruct/marshal_load_spec.rb b/spec/ruby/library/openstruct/marshal_load_spec.rb index e07c4cef05..342e5e68cd 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" 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"