mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (rb_eval): pre-evaluate argument for unambiguous
evaluation order. [ruby-dev:26383] * lib/delegate.rb (Delegator::method_missing): forward unknown method to the destination. suggested by <christophe.poucet@gmail.com>. [ruby-talk:146776] * process.c (detach_process_watcher): terminate process watcher thread right after rb_waitpid() succeed. [ruby-talk:146430] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ca1a7bc4a5
commit
04f006aea3
5 changed files with 39 additions and 6 deletions
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
Thu Jun 30 15:13:16 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_eval): pre-evaluate argument for unambiguous
|
||||
evaluation order. [ruby-dev:26383]
|
||||
|
||||
Thu Jun 30 09:53:56 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/delegate.rb (Delegator::method_missing): forward unknown
|
||||
method to the destination. suggested by
|
||||
<christophe.poucet@gmail.com>. [ruby-talk:146776]
|
||||
|
||||
Tue Jun 28 21:59:29 2005 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||
|
||||
* dir.c, eval.c, hash.c, process.c, ruby.c: avoid warning "unused
|
||||
|
@ -8,6 +19,11 @@ Sat Jun 25 17:15:23 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
|||
* lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_query): should
|
||||
discard if key=val pair is empty. patch from Gary Wright.
|
||||
|
||||
Sat Jun 25 23:30:51 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* process.c (detach_process_watcher): terminate process watcher
|
||||
thread right after rb_waitpid() succeed. [ruby-talk:146430]
|
||||
|
||||
Sat Jun 25 15:49:18 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* enum.c (enum_min, enum_max): do not ignore nil as the first element.
|
||||
|
@ -141,6 +157,7 @@ Mon Jun 13 13:01:05 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
|||
|
||||
* hash.c (ruby_setenv): fixed SEGV. [ruby-dev:26186]
|
||||
|
||||
>>>>>>> 1.2673.2.1092
|
||||
Mon Jun 13 01:54:20 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* signal.c (sigexit): call rb_thread_signal_exit() instead of
|
||||
|
@ -155,6 +172,11 @@ Mon Jun 13 01:54:20 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
|||
* eval.c (rb_f_exit): ensure exit(0) should call
|
||||
exit(EXIT_SUCCESS).
|
||||
|
||||
Mon Jun 13 01:20:02 2005 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* eval.c (rb_gc_mark_threads): curr_thread may not be part of the
|
||||
thread list. [ruby-dev:26312]
|
||||
|
||||
Fri Jun 10 23:35:34 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* missing/mkdir.c: remove. [ruby-core:05177]
|
||||
|
|
12
eval.c
12
eval.c
|
@ -3256,9 +3256,11 @@ rb_eval(self, n)
|
|||
|
||||
case NODE_DOT2:
|
||||
case NODE_DOT3:
|
||||
result = rb_range_new(rb_eval(self, node->nd_beg),
|
||||
rb_eval(self, node->nd_end),
|
||||
nd_type(node) == NODE_DOT3);
|
||||
{
|
||||
VALUE beg = rb_eval(self, node->nd_beg);
|
||||
VALUE end = rb_eval(self, node->nd_end);
|
||||
result = rb_range_new(beg, end, nd_type(node) == NODE_DOT3);
|
||||
}
|
||||
break;
|
||||
|
||||
case NODE_FLIP2: /* like AWK */
|
||||
|
@ -9905,9 +9907,9 @@ rb_gc_mark_threads()
|
|||
rb_gc_mark((VALUE)ruby_cref);
|
||||
|
||||
if (!curr_thread) return;
|
||||
FOREACH_THREAD(th) {
|
||||
FOREACH_THREAD_FROM(main_thread, th) {
|
||||
rb_gc_mark(th->thread);
|
||||
} END_FOREACH(th);
|
||||
} END_FOREACH_FROM(main_thread, th);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -49,6 +49,14 @@ class Delegator
|
|||
end
|
||||
alias initialize_methods initialize
|
||||
|
||||
def method_missing(m, *args)
|
||||
target = self.__getobj__
|
||||
unless target.respond_to?(m)
|
||||
super(m, *args)
|
||||
end
|
||||
target.__send__(m, *args)
|
||||
end
|
||||
|
||||
def __getobj__
|
||||
raise NotImplementedError, "need to define `__getobj__'"
|
||||
end
|
||||
|
|
|
@ -519,6 +519,7 @@ end
|
|||
|
||||
module Enumerable
|
||||
# Makes a set from the enumerable object with given arguments.
|
||||
# Needs to +require "set"+ to use this method.
|
||||
def to_set(klass = Set, *args, &block)
|
||||
klass.new(self, *args, &block)
|
||||
end
|
||||
|
|
|
@ -845,7 +845,7 @@ detach_process_watcer(pid_p)
|
|||
|
||||
for (;;) {
|
||||
cpid = rb_waitpid(*pid_p, &status, WNOHANG);
|
||||
if (cpid == -1) return Qnil;
|
||||
if (cpid != 0) return Qnil;
|
||||
rb_thread_sleep(1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue