diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | eval.c | 3 | ||||
-rw-r--r-- | lib/date.rb | 3 | ||||
-rw-r--r-- | lib/delegate.rb | 6 | ||||
-rw-r--r-- | object.c | 2 |
5 files changed, 15 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Wed May 11 15:58:39 2005 Yukihiro Matsumoto <matz@ruby-lang.org> + + * eval.c (break_jump): break should not cross functions. + [ruby-list:40818] + Wed May 11 10:41:54 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> * lib/tempfile.rb (Tempfile#unlink): fixed typo. @@ -4694,6 +4694,9 @@ break_jump(retval) tt->retval = retval; JUMP_TAG(TAG_BREAK); break; + case PROT_FUNC: + tt = 0; + continue; default: break; } diff --git a/lib/date.rb b/lib/date.rb index 1cd4e08049..9d33198235 100644 --- a/lib/date.rb +++ b/lib/date.rb @@ -806,12 +806,15 @@ class Date # Get the minute of this date. def min() time[1] end + alias :minute :min # Get the second of this date. def sec() time[2] end + alias :second :sec # Get the fraction-of-a-second of this date. def sec_fraction() time[3] end + alias :second_fraction :sec_fraction private :hour, :min, :sec, :sec_fraction diff --git a/lib/delegate.rb b/lib/delegate.rb index bc200d212b..b2e86de6a9 100644 --- a/lib/delegate.rb +++ b/lib/delegate.rb @@ -16,11 +16,11 @@ # ... # end -class Delegator +class Delegator<BasicObject def initialize(obj) - preserved = ::Kernel.public_instance_methods(false) - preserved -= ["to_s","to_a","inspect","==","=~","==="] + preserved = ::BasicObject.public_instance_methods(false) + ::Kernel::p preserved for t in self.class.ancestors preserved |= t.public_instance_methods(false) preserved |= t.private_instance_methods(false) @@ -2453,7 +2453,7 @@ VALUE ruby_top_self; * Creating a new Name * * Classes, modules, and objects are interrelated. In the diagram - * that follows, the arrows represent inheritance, and the + * that follows, the vertical arrows represent inheritance, and the * parentheses meta-classes. All metaclasses are instances * of the class `Class'. * |