зеркало из https://github.com/github/ruby.git
* hash.c (rb_hash_s_create): should access converted hash value.
[ruby-dev:34555] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
78008d342e
Коммит
69c213fbc7
|
@ -1,3 +1,8 @@
|
||||||
|
Thu May 1 20:47:30 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* hash.c (rb_hash_s_create): should access converted hash value.
|
||||||
|
[ruby-dev:34555]
|
||||||
|
|
||||||
Thu May 1 20:31:09 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu May 1 20:31:09 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* test/ruby/test_parse.rb (TestParse::test_void_expr_stmts_value):
|
* test/ruby/test_parse.rb (TestParse::test_void_expr_stmts_value):
|
||||||
|
|
4
hash.c
4
hash.c
|
@ -344,8 +344,8 @@ rb_hash_s_create(int argc, VALUE *argv, VALUE klass)
|
||||||
tmp = rb_hash_s_try_convert(Qnil, argv[0]);
|
tmp = rb_hash_s_try_convert(Qnil, argv[0]);
|
||||||
if (!NIL_P(tmp)) {
|
if (!NIL_P(tmp)) {
|
||||||
hash = hash_alloc(klass);
|
hash = hash_alloc(klass);
|
||||||
if (RHASH(argv[0])->ntbl) {
|
if (RHASH(tmp)->ntbl) {
|
||||||
RHASH(hash)->ntbl = st_copy(RHASH(argv[0])->ntbl);
|
RHASH(hash)->ntbl = st_copy(RHASH(tmp)->ntbl);
|
||||||
}
|
}
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче