diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-16 07:36:14 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-12-16 07:36:14 +0000 |
commit | ecaa1d3508b518cbdda5bd1250e709fa58c3a794 (patch) | |
tree | 712be48169e34575d0534bc23bb25685a8c0ad0f | |
parent | 19c542ae021e9625b42123ee01c088c452996a44 (diff) |
* dir.c (dir_set_pos): Dir#pos= should return the new position.
* variable.c (generic_ivar_get): should always warn for
uninitialized instance variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@3157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | dir.c | 2 | ||||
-rw-r--r-- | variable.c | 12 |
3 files changed, 22 insertions, 9 deletions
@@ -1,3 +1,7 @@ +Mon Dec 16 16:35:28 2002 Yukihiro Matsumoto <matz@ruby-lang.org> + + * stable version 1.6.8 release candidate. + Mon Dec 16 15:53:20 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net> * parse.y (nextc): get rid of overrun. (pointed out by akr @@ -5,6 +9,10 @@ Mon Dec 16 15:53:20 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net> * eval.c (rb_eval): untangled ruby_dyna_vars. [ruby-talk:59035] +Mon Dec 16 08:03:47 2002 Yukihiro Matsumoto <matz@ruby-lang.org> + + * dir.c (dir_set_pos): Dir#pos= should return the new position. + Sat Dec 14 02:03:51 2002 WATANABE Hirofumi <eban@ruby-lang.org> * ext/dbm/extconf.rb (db_check): support for GNU dbm 1.8.3. @@ -16,6 +24,11 @@ Fri Dec 13 23:39:09 2002 WATANABE Hirofumi <eban@ruby-lang.org> * ext/dbm/dbm.c: ditto. +Fri Dec 13 17:15:49 2002 Yukihiro Matsumoto <matz@ruby-lang.org> + + * variable.c (generic_ivar_get): should always warn for + uninitialized instance variables. + Thu Dec 12 16:26:31 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net> * marshal.c (r_object0): singleton class instance can't be loaded. @@ -34,10 +47,6 @@ Wed Dec 11 20:48:03 2002 Akinori MUSHA <knu@iDaemons.org> * lib/getoptlong.rb (GetoptLong::Error): provide a common ancestor for GetoptLong error classes (RCR#129). -Mon Dec 9 15:13:14 2002 Yukihiro Matsumoto <matz@ruby-lang.org> - - * stable version 1.6.8 release candidate. - Fri Dec 6 14:13:59 2002 Yukihiro Matsumoto <matz@ruby-lang.org> * numeric.c (num_cmp): define Numeric#<=>, remove Numeric#==. @@ -373,7 +373,7 @@ dir_set_pos(dir, pos) VALUE dir, pos; { dir_seek(dir, pos); - return dir; + return pos; } static VALUE diff --git a/variable.c b/variable.c index 95c03cd3fc..34789f479c 100644 --- a/variable.c +++ b/variable.c @@ -782,11 +782,15 @@ generic_ivar_get(obj, id) st_table *tbl; VALUE val; - if (!generic_iv_tbl) return Qnil; - if (!st_lookup(generic_iv_tbl, obj, &tbl)) return Qnil; - if (st_lookup(tbl, id, &val)) { - return val; + if (generic_iv_tbl) { + if (st_lookup(generic_iv_tbl, obj, &tbl)) { + if (st_lookup(tbl, id, &val)) { + return val; + } + } } + + rb_warning("instance variable %s not initialized", rb_id2name(id)); return Qnil; } |