aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--eval.c3
-rw-r--r--lib/date.rb3
-rw-r--r--lib/delegate.rb6
-rw-r--r--object.c2
5 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index f6a4123284..7eaee5886e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/eval.c b/eval.c
index 8ce81e3e42..0b884ebe20 100644
--- a/eval.c
+++ b/eval.c
@@ -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)
diff --git a/object.c b/object.c
index 1a81fd7d80..c422636a5c 100644
--- a/object.c
+++ b/object.c
@@ -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'.
*