1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/yaml/dbm.rb: replace indexes with values_at.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
why 2003-07-24 18:56:09 +00:00
parent 5dd2b7102c
commit cb5798876e
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Fri Jul 25 03:52:21 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
* lib/yaml/dbm.rb: replace indexes with values_at.
Fri Jul 25 02:55:59 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/extconf.rb: add check for libsocket and libnsl.

View file

@ -29,7 +29,7 @@ class DBM < ::DBM
def index( keystr )
super( keystr.to_yaml )
end
def indexes( *keys )
def values_at( *keys )
keys.collect { |k| fetch( k ) }
end
def delete( key )
@ -82,7 +82,7 @@ class DBM < ::DBM
if block_given?
self.keys.collect { |k| v = self[k]; [k, v] if yield k, v }.compact
else
indexes( *keys )
values_at( *keys )
end
end
def store( key, val )