From 4c1ac0bc07eb7ae03684761351953418ad5deb1b Mon Sep 17 00:00:00 2001 From: naruse Date: Tue, 29 Mar 2016 08:54:59 +0000 Subject: merge revision(s) 53366:[Backport #11884] * lib/ostruct.rb (OpenStruct): make respond_to? working on just-allocated objects for workaround of Psych. [ruby-core:72501] [Bug #11884] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/ostruct.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/ostruct.rb b/lib/ostruct.rb index 5aea0465bd..e7b8ed4609 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -71,6 +71,11 @@ # of these properties compared to using a Hash or a Struct. # class OpenStruct + # :nodoc: + class << self + alias allocate new + end + # # Creates a new OpenStruct object. By default, the resulting OpenStruct # object will have no attributes. -- cgit v1.2.3