diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-07 09:26:29 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-07 09:26:29 +0000 |
| commit | d7d4acb14eb2fcb505bf8532273e413017045d43 (patch) | |
| tree | e88cf34d1e19ece721133a8ad3582e8ed4727dc6 /lib/date.rb | |
| parent | b82260bc45cccea93abd4d254f8e14d77fec1d30 (diff) | |
| download | ruby-d7d4acb14eb2fcb505bf8532273e413017045d43.tar.gz ruby-d7d4acb14eb2fcb505bf8532273e413017045d43.tar.xz ruby-d7d4acb14eb2fcb505bf8532273e413017045d43.zip | |
* parse.y (arg): "||=" should not warn for uninitialized instance
variables.
* eval.c (rb_eval): ditto.
* eval.c (eval): preserve and restore ruby_cref as well.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date.rb')
| -rw-r--r-- | lib/date.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/date.rb b/lib/date.rb index cd0b99717..342212129 100644 --- a/lib/date.rb +++ b/lib/date.rb @@ -202,10 +202,7 @@ class Date alias_method :__#{id.to_i}__, :#{id.id2name} private :__#{id.to_i}__ def #{id.id2name}(*args, &block) - unless defined? @__#{id.to_i}__ - @__#{id.to_i}__ = __#{id.to_i}__(*args, &block) - end - @__#{id.to_i}__ + (@__#{id.to_i}__ ||= [__#{id.to_i}__(*args, &block)])[0] end end; end |
