diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-24 03:46:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-24 03:46:55 +0000 |
commit | 770ddcdfe069f8654a07e0fcc758aea591cdd17d (patch) | |
tree | 36c7009eeab34ae5c08ac62d6005c9ee145b46a3 /NEWS | |
parent | b05c95d93f39b95c6c743282ce4d9e674453f12f (diff) | |
download | ruby-770ddcdfe069f8654a07e0fcc758aea591cdd17d.tar.gz |
* hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.
[Feature #6276]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -21,7 +21,13 @@ with all sufficient information, see the ChangeLog file. * added method: * added Enumerable#lazy method for lazy enumeration. + * ENV + * aliased method: + * ENV.to_h is a new alias for ENV.to_hash + * Hash + * added method: + * added Hash#to_h as explicit conversion method, like Array#to_a. * extended method: * Hash#default_proc= can be passed nil to clear the default proc. @@ -41,11 +47,20 @@ with all sufficient information, see the ChangeLog file. * added LoadError#path method to return the file name that could not be loaded. + * NilClass + * added method: + * added nil.to_h which returns {} + * Signal * incompatible changes: * Signal.trap raises ArgumentError when :SEGV, :BUS, :ILL, :FPE, :VTALRM are specified. + * Struct + * added method: + * added Struct#to_h returning values with keys corresponding to the + instance variable names. + * Time * change return value: * Time#to_s returned encoding defaults to US-ASCII but automatically @@ -63,6 +78,10 @@ with all sufficient information, see the ChangeLog file. * Net::IMAP.default_ssl_port * Net::IMAP.default_imaps_port +* ostruct + * new methods: + * OpenStruct#to_h converts the struct to a hash. + * pathname * extended method: * Pathname#find returns an enumerator if no block is given. |