зеркало из https://github.com/github/ruby.git
* gc.c (id2ref): recycle check should be done by klass == 0.
[ruby-core:01408] * eval.c (Init_Thread): Continuation#[] added. [ruby-talk:79028] * parse.y (mlhs_node): should allow "::Foo" (colon3) as lhs. * parse.y (lhs): ditto. * parse.y (yylex): should return tCOLON3 right after kCLASS. [ruby-talk:78918] * error.c (exc_initialize): was converting argument to string too eagerly. Only check was needed. [ruby-talk:78958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
206efa1356
Коммит
f3d25fdd9c
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,8 @@
|
|||
Fri Aug 15 02:08:53 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* gc.c (id2ref): recycle check should be done by klass == 0.
|
||||
[ruby-core:01408]
|
||||
|
||||
Fri Aug 15 00:38:00 2003 Shigeo Kobayashi <shigek@ruby-lang.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c: Bug in div method fixed.
|
||||
|
@ -6,6 +11,10 @@ Fri Aug 15 00:38:00 2003 Shigeo Kobayashi <shigek@ruby-lang.org>
|
|||
|
||||
* ext/bigdecimal/sample/pi.rb: Changed so as to use math.rb.
|
||||
|
||||
Thu Aug 14 21:19:14 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (Init_Thread): Continuation#[] added. [ruby-talk:79028]
|
||||
|
||||
Thu Aug 14 20:03:34 2003 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* ext/win32ole/win32ole.c (OLE_FREE): should not call
|
||||
|
@ -21,6 +30,18 @@ Thu Aug 14 11:27:37 2003 NAKAMURA Usaku <usa@ruby-lang.org>
|
|||
* gc.c (rb_data_object_alloc): check type of 1st argument.
|
||||
[ruby-dev:21192]
|
||||
|
||||
Thu Aug 14 00:21:14 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* parse.y (mlhs_node): should allow "::Foo" (colon3) as lhs.
|
||||
|
||||
* parse.y (lhs): ditto.
|
||||
|
||||
* parse.y (yylex): should return tCOLON3 right after kCLASS.
|
||||
[ruby-talk:78918]
|
||||
|
||||
* error.c (exc_initialize): was converting argument to string too
|
||||
eagerly. Only check was needed. [ruby-talk:78958]
|
||||
|
||||
Wed Aug 13 23:31:00 2003 Shigeo Kobayashi <shigek@ruby-lang.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c .h .html: Ambiguity of
|
||||
|
|
7
error.c
7
error.c
|
@ -318,12 +318,13 @@ exc_initialize(argc, argv, exc)
|
|||
VALUE *argv;
|
||||
VALUE exc;
|
||||
{
|
||||
VALUE mesg;
|
||||
VALUE arg;
|
||||
|
||||
if (rb_scan_args(argc, argv, "01", &mesg) == 1) {
|
||||
if (rb_scan_args(argc, argv, "01", &arg) == 1) {
|
||||
VALUE mesg = arg;
|
||||
StringValue(mesg); /* ensure mesg can be converted to String */
|
||||
}
|
||||
rb_iv_set(exc, "mesg", mesg);
|
||||
rb_iv_set(exc, "mesg", arg);
|
||||
rb_iv_set(exc, "bt", Qnil);
|
||||
|
||||
return exc;
|
||||
|
|
1
eval.c
1
eval.c
|
@ -10114,6 +10114,7 @@ Init_Thread()
|
|||
rb_undef_alloc_func(rb_cCont);
|
||||
rb_undef_method(CLASS_OF(rb_cCont), "new");
|
||||
rb_define_method(rb_cCont, "call", rb_cont_call, -1);
|
||||
rb_define_method(rb_cCont, "[]", rb_cont_call, -1);
|
||||
rb_define_global_function("callcc", rb_callcc, 0);
|
||||
|
||||
cThGroup = rb_define_class("ThreadGroup", rb_cObject);
|
||||
|
|
2
gc.c
2
gc.c
|
@ -1639,7 +1639,7 @@ id2ref(obj, id)
|
|||
if (!is_pointer_to_heap((void *)ptr)) {
|
||||
rb_raise(rb_eRangeError, "0x%lx is not id value", p0);
|
||||
}
|
||||
if (BUILTIN_TYPE(ptr) == 0) {
|
||||
if (RBASIC(ptr)->klass == 0) {
|
||||
rb_raise(rb_eRangeError, "0x%lx is recycled object", p0);
|
||||
}
|
||||
return (VALUE)ptr;
|
||||
|
|
|
@ -113,7 +113,7 @@ module XMLRPC
|
|||
def initialize(prefix, &p)
|
||||
raise "No interface specified" if p.nil?
|
||||
super(prefix)
|
||||
instance_eval &p
|
||||
instance_eval(&p)
|
||||
end
|
||||
|
||||
def get_methods(obj, delim=".")
|
||||
|
|
20
parse.y
20
parse.y
|
@ -809,6 +809,12 @@ mlhs_node : variable
|
|||
yyerror("dynamic constant assignment");
|
||||
$$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
|
||||
}
|
||||
| tCOLON3 tCONSTANT
|
||||
{
|
||||
if (in_def || in_single)
|
||||
yyerror("dynamic constant assignment");
|
||||
$$ = NEW_CDECL(0, 0, NEW_COLON3($2));
|
||||
}
|
||||
| backref
|
||||
{
|
||||
rb_backref_error($1);
|
||||
|
@ -842,6 +848,12 @@ lhs : variable
|
|||
yyerror("dynamic constant assignment");
|
||||
$$ = NEW_CDECL(0, 0, NEW_COLON2($1, $3));
|
||||
}
|
||||
| tCOLON3 tCONSTANT
|
||||
{
|
||||
if (in_def || in_single)
|
||||
yyerror("dynamic constant assignment");
|
||||
$$ = NEW_CDECL(0, 0, NEW_COLON3($2));
|
||||
}
|
||||
| backref
|
||||
{
|
||||
rb_backref_error($1);
|
||||
|
@ -1026,6 +1038,10 @@ arg : lhs '=' arg
|
|||
{
|
||||
yyerror("constant re-assignment");
|
||||
}
|
||||
| tCOLON3 tCONSTANT tOP_ASGN arg
|
||||
{
|
||||
yyerror("constant re-assignment");
|
||||
}
|
||||
| backref tOP_ASGN arg
|
||||
{
|
||||
rb_backref_error($1);
|
||||
|
@ -1431,7 +1447,7 @@ primary : literal
|
|||
{
|
||||
$$ = NEW_COLON2($1, $3);
|
||||
}
|
||||
| tCOLON3 cname
|
||||
| tCOLON3 tCONSTANT
|
||||
{
|
||||
$$ = NEW_COLON3($2);
|
||||
}
|
||||
|
@ -3928,7 +3944,7 @@ yylex()
|
|||
c = nextc();
|
||||
if (c == ':') {
|
||||
if (lex_state == EXPR_BEG || lex_state == EXPR_MID ||
|
||||
(IS_ARG() && space_seen)) {
|
||||
lex_state == EXPR_CLASS || (IS_ARG() && space_seen)) {
|
||||
lex_state = EXPR_BEG;
|
||||
return tCOLON3;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче