diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-13 02:17:58 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-13 02:17:58 +0000 |
| commit | b2d5851b197808d651e8f78f3e91b2035c3003e7 (patch) | |
| tree | cdf739a43f552a3ceb4fa3bd21c3e70530158985 | |
| parent | 05b9a9f3816859058b2f0d0e0bcdafdc741f4dc1 (diff) | |
| download | ruby-b2d5851b197808d651e8f78f3e91b2035c3003e7.tar.gz ruby-b2d5851b197808d651e8f78f3e91b2035c3003e7.tar.xz ruby-b2d5851b197808d651e8f78f3e91b2035c3003e7.zip | |
* parse.y (debug_lines): use rb_hash_lookup() to get rid of
call of Hash#default.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | parse.y | 2 |
2 files changed, 5 insertions, 2 deletions
@@ -1,10 +1,13 @@ -Fri Jul 13 11:16:25 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> +Fri Jul 13 11:17:53 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (program, stmt, primary): reduced duplicated code. * parse.y (dsym): convert also literals containing NUL to symbol. + * parse.y (debug_lines): use rb_hash_lookup() to get rid of + call of Hash#default. + Fri Jul 13 10:33:29 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * array.c (rb_ary_flatten_bang): check argument if valid @@ -4597,7 +4597,7 @@ debug_lines(VALUE f) VALUE hash = rb_const_get_at(rb_cObject, rb_intern("SCRIPT_LINES__")); if (TYPE(hash) == T_HASH) { VALUE fname = rb_str_new2((const char *)f); - VALUE lines = rb_hash_aref(hash, fname); + VALUE lines = rb_hash_lookup(hash, fname); if (NIL_P(lines)) { lines = rb_ary_new(); rb_hash_aset(hash, fname, lines); |
