diff options
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -240,7 +240,7 @@ rb_hash_s_create(argc, argv, klass) hash = rb_hash_s_alloc(klass); for (i=0; i<argc; i+=2) { - st_insert(RHASH(hash)->tbl, argv[i], argv[i+1]); + rb_hash_aset(hash, argv[i], argv[i + 1]); } return hash; @@ -314,7 +314,7 @@ rb_hash_fetch(argc, argv, hash) if (!st_lookup(RHASH(hash)->tbl, key, &val)) { if (rb_block_given_p()) { if (argc > 1) { - rb_raise(rb_eArgError, "wrong number of arguments", argc); + rb_raise(rb_eArgError, "wrong number of arguments"); } return rb_yield(key); } |