2000-05-01 13:42:38 +04:00
|
|
|
/**********************************************************************
|
1998-01-16 15:13:05 +03:00
|
|
|
|
|
|
|
node.h -
|
|
|
|
|
|
|
|
$Author$
|
|
|
|
$Date$
|
|
|
|
created at: Fri May 28 15:14:02 JST 1993
|
|
|
|
|
2003-01-16 10:34:03 +03:00
|
|
|
Copyright (C) 1993-2003 Yukihiro Matsumoto
|
1998-01-16 15:13:05 +03:00
|
|
|
|
2000-05-01 13:42:38 +04:00
|
|
|
**********************************************************************/
|
1998-01-16 15:13:05 +03:00
|
|
|
|
|
|
|
#ifndef NODE_H
|
|
|
|
#define NODE_H
|
|
|
|
|
1999-10-29 13:25:48 +04:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
1998-01-16 15:13:05 +03:00
|
|
|
enum node_type {
|
|
|
|
NODE_METHOD,
|
|
|
|
NODE_FBODY,
|
|
|
|
NODE_CFUNC,
|
|
|
|
NODE_SCOPE,
|
|
|
|
NODE_BLOCK,
|
|
|
|
NODE_IF,
|
|
|
|
NODE_CASE,
|
|
|
|
NODE_WHEN,
|
|
|
|
NODE_OPT_N,
|
|
|
|
NODE_WHILE,
|
|
|
|
NODE_UNTIL,
|
|
|
|
NODE_ITER,
|
|
|
|
NODE_FOR,
|
1998-01-16 15:19:22 +03:00
|
|
|
NODE_BREAK,
|
|
|
|
NODE_NEXT,
|
|
|
|
NODE_REDO,
|
|
|
|
NODE_RETRY,
|
1998-01-16 15:13:05 +03:00
|
|
|
NODE_BEGIN,
|
|
|
|
NODE_RESCUE,
|
|
|
|
NODE_RESBODY,
|
|
|
|
NODE_ENSURE,
|
|
|
|
NODE_AND,
|
|
|
|
NODE_OR,
|
|
|
|
NODE_NOT,
|
|
|
|
NODE_MASGN,
|
|
|
|
NODE_LASGN,
|
|
|
|
NODE_DASGN,
|
2000-02-01 06:12:21 +03:00
|
|
|
NODE_DASGN_CURR,
|
1998-01-16 15:13:05 +03:00
|
|
|
NODE_GASGN,
|
|
|
|
NODE_IASGN,
|
1999-11-17 10:30:37 +03:00
|
|
|
NODE_CDECL,
|
2000-11-21 17:26:25 +03:00
|
|
|
NODE_CVASGN,
|
2000-03-23 11:37:35 +03:00
|
|
|
NODE_CVDECL,
|
1998-01-16 15:13:05 +03:00
|
|
|
NODE_OP_ASGN1,
|
|
|
|
NODE_OP_ASGN2,
|
1999-01-20 07:59:39 +03:00
|
|
|
NODE_OP_ASGN_AND,
|
|
|
|
NODE_OP_ASGN_OR,
|
1998-01-16 15:13:05 +03:00
|
|
|
NODE_CALL,
|
|
|
|
NODE_FCALL,
|
|
|
|
NODE_VCALL,
|
|
|
|
NODE_SUPER,
|
|
|
|
NODE_ZSUPER,
|
|
|
|
NODE_ARRAY,
|
|
|
|
NODE_ZARRAY,
|
2004-05-07 12:44:24 +04:00
|
|
|
NODE_VALUES,
|
1998-01-16 15:13:05 +03:00
|
|
|
NODE_HASH,
|
|
|
|
NODE_RETURN,
|
|
|
|
NODE_YIELD,
|
|
|
|
NODE_LVAR,
|
|
|
|
NODE_DVAR,
|
|
|
|
NODE_GVAR,
|
|
|
|
NODE_IVAR,
|
2000-03-23 11:37:35 +03:00
|
|
|
NODE_CONST,
|
1998-01-16 15:13:05 +03:00
|
|
|
NODE_CVAR,
|
|
|
|
NODE_NTH_REF,
|
|
|
|
NODE_BACK_REF,
|
|
|
|
NODE_MATCH,
|
1998-01-16 15:19:22 +03:00
|
|
|
NODE_MATCH2,
|
|
|
|
NODE_MATCH3,
|
1998-01-16 15:13:05 +03:00
|
|
|
NODE_LIT,
|
|
|
|
NODE_STR,
|
|
|
|
NODE_DSTR,
|
|
|
|
NODE_XSTR,
|
|
|
|
NODE_DXSTR,
|
|
|
|
NODE_EVSTR,
|
|
|
|
NODE_DREGX,
|
|
|
|
NODE_DREGX_ONCE,
|
|
|
|
NODE_ARGS,
|
* sprintf.c (rb_str_format): allow %c to print one character
string (e.g. ?x).
* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
basename and pid. [ruby-talk:196272]
* parse.y (do_block): remove -> style block.
* parse.y (parser_yylex): remove tLAMBDA_ARG.
* eval.c (rb_call0): binding for the return event hook should have
consistent scope. [ruby-core:07928]
* eval.c (proc_invoke): return behavior should depend whether it
is surrounded by a lambda or a mere block.
* eval.c (formal_assign): handles post splat arguments.
* eval.c (rb_call0): ditto.
* st.c (strhash): use FNV-1a hash.
* parse.y (parser_yylex): removed experimental ';;' terminator.
* eval.c (rb_node_arity): should be aware of post splat arguments.
* eval.c (rb_proc_arity): ditto.
* parse.y (f_args): syntax rule enhanced to support arguments
after the splat.
* parse.y (block_param): ditto for block parameters.
* parse.y (f_post_arg): mandatory formal arguments after the splat
argument.
* parse.y (new_args_gen): generate nodes for mandatory formal
arguments after the splat argument.
* eval.c (rb_eval): dispatch mandatory formal arguments after the
splat argument.
* parse.y (args): allow more than one splat in the argument list.
* parse.y (method_call): allow aref [] to accept all kind of
method argument, including assocs, splat, and block argument.
* eval.c (SETUP_ARGS0): prepare block argument as well.
* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]
* eval.c (error_line): print receivers true/false/nil specially.
* eval.c (rb_proc_yield): handles parameters in yield semantics.
* eval.c (nil_yield): gives LocalJumpError to denote no block
error.
* io.c (rb_io_getc): now takes one-character string.
* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
hashing algorithm.
* string.c (rb_str_aref): str[0] now returns 1 character string,
instead of a fixnum. [Ruby2]
* parse.y (parser_yylex): ?c now returns 1 character string,
instead of a fixnum. [Ruby2]
* string.c (rb_str_aset): no longer support fixnum insertion.
* eval.c (umethod_bind): should not update original class.
[ruby-dev:28636]
* eval.c (ev_const_get): should support constant access from
within instance_eval(). [ruby-dev:28327]
* time.c (time_timeval): should round for usec floating
number. [ruby-core:07896]
* time.c (time_add): ditto.
* dir.c (sys_warning): should not call a vararg function
rb_sys_warning() indirectly. [ruby-core:07886]
* numeric.c (flo_divmod): the first element of Float#divmod should
be an integer. [ruby-dev:28589]
* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.
* re.c (rb_reg_initialize): should not allow modifying literal
regexps. frozen check moved from rb_reg_initialize_m as well.
* re.c (rb_reg_initialize): should not modify untainted objects in
safe levels higher than 3.
* re.c (rb_memcmp): type change from char* to const void*.
* dir.c (dir_close): should not close untainted dir stream.
* dir.c (GetDIR): add tainted/frozen check for each dir operation.
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
typo fixed. a patch from Florian Gross <florg at florg.net>.
* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
event_hooks. no guarantee for arbitrary hook deletion.
[ruby-dev:28632]
* util.c (ruby_strtod): differ addition to minimize error.
[ruby-dev:28619]
* util.c (ruby_strtod): should not raise ERANGE when the input
string does not have any digits. [ruby-dev:28629]
* eval.c (proc_invoke): should restore old ruby_frame->block.
thanks to ts <decoux at moulon.inra.fr>. [ruby-core:07833]
also fix [ruby-dev:28614] as well.
* signal.c (trap): sig should be less then NSIG. Coverity found
this bug. a patch from Kevin Tew <tewk at tewk.com>.
[ruby-core:07823]
* math.c (math_log2): add new method inspired by
[ruby-talk:191237].
* math.c (math_log): add optional base argument to Math::log().
[ruby-talk:191308]
* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
uninitialized array element. a patch from Pat Eyler
<rubypate at gmail.com>. [ruby-core:07809]
* array.c (rb_ary_fill): initialize local variables first. a
patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07810]
* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
type_tag. a patch from Pat Eyler <rubypate at gmail.com>.
[ruby-core:07808]
* ext/socket/socket.c (make_hostent_internal): accept ai_family
check from Sam Roberts <sroberts at uniserve.com>.
[ruby-core:07691]
* util.c (ruby_strtod): should not cut off 18 digits for no
reason. [ruby-core:07796]
* array.c (rb_ary_fill): internalize local variable "beg" to
pacify Coverity. [ruby-core:07770]
* pack.c (pack_unpack): now supports CRLF newlines. a patch from
<tommy at tmtm.org>. [ruby-dev:28601]
* applied code clean-up patch from Stefan Huehner
<stefan at huehner.org>. [ruby-core:07764]
* lib/jcode.rb (String::tr_s): should have translated non
squeezing character sequence (i.e. a character) as well. thanks
to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090]
* ext/socket/socket.c: document update patch from Sam Roberts
<sroberts at uniserve.com>. [ruby-core:07701]
* lib/mathn.rb (Integer): need not to remove gcd2. a patch from
NARUSE, Yui <naruse at airemix.com>. [ruby-dev:28570]
* parse.y (arg): too much NEW_LIST()
* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.
* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
[ruby-dev:28585]
* parse.y (arg): use NODE_ARGSCAT for placeholder.
* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
mathew <meta at pobox.com>. [ruby-core:07738]
* variable.c (rb_const_set): raise error when no target klass is
supplied. [ruby-dev:28582]
* prec.c (prec_prec_f): documentation patch from
<gerardo.santana at gmail.com>. [ruby-core:07689]
* bignum.c (rb_big_pow): second operand may be too big even if
it's a Fixnum. [ruby-talk:187984]
* README.EXT: update symbol description. [ruby-talk:188104]
* COPYING: explicitly note GPLv2. [ruby-talk:187922]
* parse.y: remove some obsolete syntax rules (unparenthesized
method calls in argument list).
* eval.c (rb_call0): insecure calling should be checked for non
NODE_SCOPE method invocations too.
* eval.c (rb_alias): should preserve the current safe level as
well as method definition.
* process.c (rb_f_sleep): remove RDoc description about SIGALRM
which is not valid on the current implementation. [ruby-dev:28464]
Thu Mar 23 21:40:47 2006 K.Kosako <sndgk393 AT ybb.ne.jp>
* eval.c (method_missing): should support argument splat in
super. a bug in combination of super, splat and
method_missing. [ruby-talk:185438]
* configure.in: Solaris SunPro compiler -rapth patch from
<kuwa at labs.fujitsu.com>. [ruby-dev:28443]
* configure.in: remove enable_rpath=no for Solaris.
[ruby-dev:28440]
* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
of converting OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
String object.
* ruby.1: a clarification patch from David Lutterkort
<dlutter at redhat.com>. [ruby-core:7508]
* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
directories. a patch from Eric Hodel <drbrain at segment7.net>.
[ruby-core:07423]
* eval.c (rb_clear_cache_by_class): clearing wrong cache.
* ext/extmk.rb: use :remove_destination to install extension libraries
to avoid SEGV. [ruby-dev:28417]
* eval.c (rb_thread_fd_writable): should not re-schedule output
from KILLED thread (must be error printing).
* array.c (rb_ary_flatten_bang): allow specifying recursion
level. [ruby-talk:182170]
* array.c (rb_ary_flatten): ditto.
* gc.c (add_heap): a heap_slots may overflow. a patch from Stefan
Weil <weil at mail.berlios.de>.
* eval.c (rb_call): use separate cache for fcall/vcall
invocation.
* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
functions.
* eval.c (rb_mod_local): a new method to specify newly added
visibility "local".
* eval.c (search_method): search for local methods which are
visible only from the current class.
* class.c (rb_class_local_methods): a method to list local methods.
* object.c (Init_Object): add BasicObject class as a top level
BlankSlate class.
* ruby.h (SYM2ID): should not cast to signed long.
[ruby-core:07414]
* class.c (rb_include_module): allow module duplication.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-10 01:20:17 +04:00
|
|
|
NODE_POSTARG,
|
1999-01-20 07:59:39 +03:00
|
|
|
NODE_ARGSCAT,
|
2000-01-17 11:37:53 +03:00
|
|
|
NODE_ARGSPUSH,
|
2003-03-26 10:01:14 +03:00
|
|
|
NODE_SPLAT,
|
2003-10-06 21:59:53 +04:00
|
|
|
NODE_TO_ARY,
|
1999-01-20 07:59:39 +03:00
|
|
|
NODE_BLOCK_ARG,
|
|
|
|
NODE_BLOCK_PASS,
|
1998-01-16 15:13:05 +03:00
|
|
|
NODE_DEFN,
|
|
|
|
NODE_DEFS,
|
|
|
|
NODE_ALIAS,
|
|
|
|
NODE_VALIAS,
|
|
|
|
NODE_UNDEF,
|
|
|
|
NODE_CLASS,
|
|
|
|
NODE_MODULE,
|
|
|
|
NODE_SCLASS,
|
|
|
|
NODE_COLON2,
|
1999-01-20 07:59:39 +03:00
|
|
|
NODE_COLON3,
|
1998-01-16 15:13:05 +03:00
|
|
|
NODE_CREF,
|
|
|
|
NODE_DOT2,
|
|
|
|
NODE_DOT3,
|
|
|
|
NODE_FLIP2,
|
|
|
|
NODE_FLIP3,
|
|
|
|
NODE_ATTRSET,
|
|
|
|
NODE_SELF,
|
|
|
|
NODE_NIL,
|
1998-01-16 15:19:22 +03:00
|
|
|
NODE_TRUE,
|
|
|
|
NODE_FALSE,
|
2004-01-22 11:31:33 +03:00
|
|
|
NODE_ERRINFO,
|
1998-01-16 15:13:05 +03:00
|
|
|
NODE_DEFINED,
|
1998-01-16 15:19:22 +03:00
|
|
|
NODE_POSTEXE,
|
1999-01-20 07:59:39 +03:00
|
|
|
NODE_ALLOCA,
|
2000-12-05 12:36:54 +03:00
|
|
|
NODE_BMETHOD,
|
2000-01-17 11:37:53 +03:00
|
|
|
NODE_MEMO,
|
2001-01-09 10:26:21 +03:00
|
|
|
NODE_IFUNC,
|
2002-10-23 14:17:30 +04:00
|
|
|
NODE_DSYM,
|
2002-12-17 13:34:30 +03:00
|
|
|
NODE_ATTRASGN,
|
2004-09-22 04:19:15 +04:00
|
|
|
NODE_PRELUDE,
|
2005-03-02 06:21:31 +03:00
|
|
|
NODE_LAMBDA,
|
2000-05-01 13:42:38 +04:00
|
|
|
NODE_LAST
|
1998-01-16 15:13:05 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct RNode {
|
1999-01-20 07:59:39 +03:00
|
|
|
unsigned long flags;
|
1998-01-16 15:19:22 +03:00
|
|
|
char *nd_file;
|
1998-01-16 15:13:05 +03:00
|
|
|
union {
|
|
|
|
struct RNode *node;
|
|
|
|
ID id;
|
|
|
|
VALUE value;
|
2001-05-02 08:22:21 +04:00
|
|
|
VALUE (*cfunc)(ANYARGS);
|
1998-01-16 15:13:05 +03:00
|
|
|
ID *tbl;
|
|
|
|
} u1;
|
|
|
|
union {
|
|
|
|
struct RNode *node;
|
|
|
|
ID id;
|
2002-12-31 22:24:29 +03:00
|
|
|
long argc;
|
1998-01-16 15:13:05 +03:00
|
|
|
VALUE value;
|
|
|
|
} u2;
|
|
|
|
union {
|
|
|
|
struct RNode *node;
|
|
|
|
ID id;
|
2000-05-24 08:34:26 +04:00
|
|
|
long state;
|
1998-01-16 15:13:05 +03:00
|
|
|
struct global_entry *entry;
|
2000-05-24 08:34:26 +04:00
|
|
|
long cnt;
|
1998-01-16 15:13:05 +03:00
|
|
|
VALUE value;
|
|
|
|
} u3;
|
|
|
|
} NODE;
|
|
|
|
|
2006-08-31 08:14:53 +04:00
|
|
|
extern NODE *ruby_cref;
|
|
|
|
extern NODE *ruby_top_cref;
|
|
|
|
|
1998-01-16 15:13:05 +03:00
|
|
|
#define RNODE(obj) (R_CAST(RNode)(obj))
|
|
|
|
|
2004-11-17 05:27:38 +03:00
|
|
|
/* 0..4:T_TYPES, 5:FL_MARK, 6:reserved, 7:NODE_NEWLINE */
|
|
|
|
#define NODE_NEWLINE (1<<7)
|
1998-01-16 15:13:05 +03:00
|
|
|
|
2004-11-17 05:27:38 +03:00
|
|
|
#define NODE_TYPESHIFT 8
|
|
|
|
#define NODE_TYPEMASK (0x7f<<NODE_TYPESHIFT)
|
|
|
|
|
|
|
|
#define nd_type(n) ((int) (((RNODE(n))->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
|
2004-10-27 13:29:26 +04:00
|
|
|
#define nd_set_type(n,t) \
|
|
|
|
RNODE(n)->flags=((RNODE(n)->flags&~NODE_TYPEMASK)|(((t)<<NODE_TYPESHIFT)&NODE_TYPEMASK))
|
2004-01-21 19:47:23 +03:00
|
|
|
|
2004-11-17 05:27:38 +03:00
|
|
|
#define NODE_LSHIFT (NODE_TYPESHIFT+7)
|
2006-07-18 10:22:28 +04:00
|
|
|
#define NODE_LMASK (((VALUE)1<<(sizeof(NODE*)*CHAR_BIT-NODE_LSHIFT))-1)
|
2002-08-27 12:27:11 +04:00
|
|
|
#define nd_line(n) ((unsigned int)(((RNODE(n))->flags>>NODE_LSHIFT)&NODE_LMASK))
|
1998-01-16 15:13:05 +03:00
|
|
|
#define nd_set_line(n,l) \
|
1999-01-20 07:59:39 +03:00
|
|
|
RNODE(n)->flags=((RNODE(n)->flags&~(-1<<NODE_LSHIFT))|(((l)&NODE_LMASK)<<NODE_LSHIFT))
|
1998-01-16 15:13:05 +03:00
|
|
|
|
|
|
|
#define nd_head u1.node
|
|
|
|
#define nd_alen u2.argc
|
|
|
|
#define nd_next u3.node
|
|
|
|
|
|
|
|
#define nd_cond u1.node
|
|
|
|
#define nd_body u2.node
|
|
|
|
#define nd_else u3.node
|
|
|
|
|
|
|
|
#define nd_orig u3.value
|
|
|
|
|
|
|
|
#define nd_resq u2.node
|
|
|
|
#define nd_ensr u3.node
|
|
|
|
|
|
|
|
#define nd_1st u1.node
|
|
|
|
#define nd_2nd u2.node
|
|
|
|
|
|
|
|
#define nd_stts u1.node
|
|
|
|
|
|
|
|
#define nd_entry u3.entry
|
|
|
|
#define nd_vid u1.id
|
|
|
|
#define nd_cflag u2.id
|
|
|
|
#define nd_cval u3.value
|
|
|
|
|
|
|
|
#define nd_cnt u3.cnt
|
|
|
|
#define nd_tbl u1.tbl
|
|
|
|
|
|
|
|
#define nd_var u1.node
|
|
|
|
#define nd_ibdy u2.node
|
|
|
|
#define nd_iter u3.node
|
|
|
|
|
|
|
|
#define nd_value u2.node
|
|
|
|
#define nd_aid u3.id
|
|
|
|
|
|
|
|
#define nd_lit u1.value
|
|
|
|
|
2005-07-27 11:27:19 +04:00
|
|
|
#define nd_frml u3.value
|
|
|
|
#define nd_rest u2.node
|
1998-01-16 15:13:05 +03:00
|
|
|
#define nd_opt u1.node
|
|
|
|
|
|
|
|
#define nd_recv u1.node
|
|
|
|
#define nd_mid u2.id
|
|
|
|
#define nd_args u3.node
|
|
|
|
|
|
|
|
#define nd_noex u1.id
|
|
|
|
#define nd_defn u3.node
|
|
|
|
|
|
|
|
#define nd_cfnc u1.cfunc
|
|
|
|
#define nd_argc u2.argc
|
|
|
|
|
2003-02-19 12:27:49 +03:00
|
|
|
#define nd_cpath u1.node
|
1998-01-16 15:19:22 +03:00
|
|
|
#define nd_super u3.node
|
1998-01-16 15:13:05 +03:00
|
|
|
|
|
|
|
#define nd_modl u1.id
|
|
|
|
#define nd_clss u1.value
|
2006-02-13 07:53:22 +03:00
|
|
|
#define nd_vis u2.argc
|
1998-01-16 15:13:05 +03:00
|
|
|
|
|
|
|
#define nd_beg u1.node
|
|
|
|
#define nd_end u2.node
|
|
|
|
#define nd_state u3.state
|
1999-01-20 07:59:39 +03:00
|
|
|
#define nd_rval u2.value
|
1998-01-16 15:13:05 +03:00
|
|
|
|
|
|
|
#define nd_nth u2.argc
|
|
|
|
|
|
|
|
#define nd_tag u1.id
|
|
|
|
#define nd_tval u2.value
|
|
|
|
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_NODE(t,a0,a1,a2) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2))
|
|
|
|
|
|
|
|
#define NEW_METHOD(n,x) NEW_NODE(NODE_METHOD,x,n,0)
|
|
|
|
#define NEW_FBODY(n,i,o) NEW_NODE(NODE_FBODY,n,i,o)
|
|
|
|
#define NEW_DEFN(i,a,d,p) NEW_NODE(NODE_DEFN,p,i,NEW_RFUNC(a,d))
|
|
|
|
#define NEW_DEFS(r,i,a,d) NEW_NODE(NODE_DEFS,r,i,NEW_RFUNC(a,d))
|
|
|
|
#define NEW_CFUNC(f,c) NEW_NODE(NODE_CFUNC,f,c,0)
|
|
|
|
#define NEW_IFUNC(f,c) NEW_NODE(NODE_IFUNC,f,c,0)
|
1998-01-16 15:13:05 +03:00
|
|
|
#define NEW_RFUNC(b1,b2) NEW_SCOPE(block_append(b1,b2))
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_SCOPE(b) NEW_NODE(NODE_SCOPE,local_tbl(),0,(b))
|
|
|
|
#define NEW_BLOCK(a) NEW_NODE(NODE_BLOCK,a,0,0)
|
|
|
|
#define NEW_IF(c,t,e) NEW_NODE(NODE_IF,c,t,e)
|
1999-01-20 07:59:39 +03:00
|
|
|
#define NEW_UNLESS(c,t,e) NEW_IF(c,e,t)
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_CASE(h,b) NEW_NODE(NODE_CASE,h,b,0)
|
|
|
|
#define NEW_WHEN(c,t,e) NEW_NODE(NODE_WHEN,c,t,e)
|
|
|
|
#define NEW_OPT_N(b) NEW_NODE(NODE_OPT_N,0,b,0)
|
|
|
|
#define NEW_WHILE(c,b,n) NEW_NODE(NODE_WHILE,c,b,n)
|
|
|
|
#define NEW_UNTIL(c,b,n) NEW_NODE(NODE_UNTIL,c,b,n)
|
|
|
|
#define NEW_FOR(v,i,b) NEW_NODE(NODE_FOR,v,b,i)
|
|
|
|
#define NEW_ITER(v,i,b) NEW_NODE(NODE_ITER,v,b,i)
|
2005-07-27 11:27:19 +04:00
|
|
|
#define NEW_LAMBDA(a,b) NEW_NODE(NODE_LAMBDA,a,b,0)
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_BREAK(s) NEW_NODE(NODE_BREAK,s,0,0)
|
|
|
|
#define NEW_NEXT(s) NEW_NODE(NODE_NEXT,s,0,0)
|
|
|
|
#define NEW_REDO() NEW_NODE(NODE_REDO,0,0,0)
|
|
|
|
#define NEW_RETRY() NEW_NODE(NODE_RETRY,0,0,0)
|
|
|
|
#define NEW_BEGIN(b) NEW_NODE(NODE_BEGIN,0,b,0)
|
|
|
|
#define NEW_RESCUE(b,res,e) NEW_NODE(NODE_RESCUE,b,res,e)
|
|
|
|
#define NEW_RESBODY(a,ex,n) NEW_NODE(NODE_RESBODY,n,ex,a)
|
|
|
|
#define NEW_ENSURE(b,en) NEW_NODE(NODE_ENSURE,b,0,en)
|
|
|
|
#define NEW_RETURN(s) NEW_NODE(NODE_RETURN,s,0,0)
|
|
|
|
#define NEW_YIELD(a,s) NEW_NODE(NODE_YIELD,a,0,s)
|
1998-01-16 15:13:05 +03:00
|
|
|
#define NEW_LIST(a) NEW_ARRAY(a)
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_ARRAY(a) NEW_NODE(NODE_ARRAY,a,1,0)
|
|
|
|
#define NEW_ZARRAY() NEW_NODE(NODE_ZARRAY,0,0,0)
|
|
|
|
#define NEW_HASH(a) NEW_NODE(NODE_HASH,a,0,0)
|
|
|
|
#define NEW_NOT(a) NEW_NODE(NODE_NOT,0,a,0)
|
|
|
|
#define NEW_MASGN(l,r) NEW_NODE(NODE_MASGN,l,0,r)
|
|
|
|
#define NEW_GASGN(v,val) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v))
|
|
|
|
#define NEW_LASGN(v,val) NEW_NODE(NODE_LASGN,v,val,local_cnt(v))
|
|
|
|
#define NEW_DASGN(v,val) NEW_NODE(NODE_DASGN,v,val,0)
|
|
|
|
#define NEW_DASGN_CURR(v,val) NEW_NODE(NODE_DASGN_CURR,v,val,0)
|
|
|
|
#define NEW_IASGN(v,val) NEW_NODE(NODE_IASGN,v,val,0)
|
|
|
|
#define NEW_CDECL(v,val,path) NEW_NODE(NODE_CDECL,v,val,path)
|
|
|
|
#define NEW_CVASGN(v,val) NEW_NODE(NODE_CVASGN,v,val,0)
|
|
|
|
#define NEW_CVDECL(v,val) NEW_NODE(NODE_CVDECL,v,val,0)
|
|
|
|
#define NEW_OP_ASGN1(p,id,a) NEW_NODE(NODE_OP_ASGN1,p,id,a)
|
|
|
|
#define NEW_OP_ASGN2(r,i,o,val) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o))
|
|
|
|
#define NEW_OP_ASGN22(i,o) NEW_NODE(NODE_OP_ASGN2,i,o,rb_id_attrset(i))
|
|
|
|
#define NEW_OP_ASGN_OR(i,val) NEW_NODE(NODE_OP_ASGN_OR,i,val,0)
|
|
|
|
#define NEW_OP_ASGN_AND(i,val) NEW_NODE(NODE_OP_ASGN_AND,i,val,0)
|
|
|
|
#define NEW_GVAR(v) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v))
|
|
|
|
#define NEW_LVAR(v) NEW_NODE(NODE_LVAR,v,0,local_cnt(v))
|
2004-10-02 15:34:13 +04:00
|
|
|
#define NEW_DVAR(v) NEW_NODE(NODE_DVAR,v,0,0)
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_IVAR(v) NEW_NODE(NODE_IVAR,v,0,0)
|
|
|
|
#define NEW_CONST(v) NEW_NODE(NODE_CONST,v,0,0)
|
|
|
|
#define NEW_CVAR(v) NEW_NODE(NODE_CVAR,v,0,0)
|
|
|
|
#define NEW_NTH_REF(n) NEW_NODE(NODE_NTH_REF,0,n,local_cnt('~'))
|
|
|
|
#define NEW_BACK_REF(n) NEW_NODE(NODE_BACK_REF,0,n,local_cnt('~'))
|
|
|
|
#define NEW_MATCH(c) NEW_NODE(NODE_MATCH,c,0,0)
|
|
|
|
#define NEW_MATCH2(n1,n2) NEW_NODE(NODE_MATCH2,n1,n2,0)
|
|
|
|
#define NEW_MATCH3(r,n2) NEW_NODE(NODE_MATCH3,r,n2,0)
|
|
|
|
#define NEW_LIT(l) NEW_NODE(NODE_LIT,l,0,0)
|
|
|
|
#define NEW_STR(s) NEW_NODE(NODE_STR,s,0,0)
|
2004-05-18 09:00:58 +04:00
|
|
|
#define NEW_DSTR(s) NEW_NODE(NODE_DSTR,s,1,0)
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_XSTR(s) NEW_NODE(NODE_XSTR,s,0,0)
|
|
|
|
#define NEW_DXSTR(s) NEW_NODE(NODE_DXSTR,s,0,0)
|
|
|
|
#define NEW_DSYM(s) NEW_NODE(NODE_DSYM,s,0,0)
|
|
|
|
#define NEW_EVSTR(n) NEW_NODE(NODE_EVSTR,0,(n),0)
|
|
|
|
#define NEW_CALL(r,m,a) NEW_NODE(NODE_CALL,r,m,a)
|
|
|
|
#define NEW_FCALL(m,a) NEW_NODE(NODE_FCALL,0,m,a)
|
|
|
|
#define NEW_VCALL(m) NEW_NODE(NODE_VCALL,0,m,0)
|
|
|
|
#define NEW_SUPER(a) NEW_NODE(NODE_SUPER,0,0,a)
|
|
|
|
#define NEW_ZSUPER() NEW_NODE(NODE_ZSUPER,0,0,0)
|
|
|
|
#define NEW_ARGS(f,o,r) NEW_NODE(NODE_ARGS,o,r,f)
|
* sprintf.c (rb_str_format): allow %c to print one character
string (e.g. ?x).
* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
basename and pid. [ruby-talk:196272]
* parse.y (do_block): remove -> style block.
* parse.y (parser_yylex): remove tLAMBDA_ARG.
* eval.c (rb_call0): binding for the return event hook should have
consistent scope. [ruby-core:07928]
* eval.c (proc_invoke): return behavior should depend whether it
is surrounded by a lambda or a mere block.
* eval.c (formal_assign): handles post splat arguments.
* eval.c (rb_call0): ditto.
* st.c (strhash): use FNV-1a hash.
* parse.y (parser_yylex): removed experimental ';;' terminator.
* eval.c (rb_node_arity): should be aware of post splat arguments.
* eval.c (rb_proc_arity): ditto.
* parse.y (f_args): syntax rule enhanced to support arguments
after the splat.
* parse.y (block_param): ditto for block parameters.
* parse.y (f_post_arg): mandatory formal arguments after the splat
argument.
* parse.y (new_args_gen): generate nodes for mandatory formal
arguments after the splat argument.
* eval.c (rb_eval): dispatch mandatory formal arguments after the
splat argument.
* parse.y (args): allow more than one splat in the argument list.
* parse.y (method_call): allow aref [] to accept all kind of
method argument, including assocs, splat, and block argument.
* eval.c (SETUP_ARGS0): prepare block argument as well.
* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]
* eval.c (error_line): print receivers true/false/nil specially.
* eval.c (rb_proc_yield): handles parameters in yield semantics.
* eval.c (nil_yield): gives LocalJumpError to denote no block
error.
* io.c (rb_io_getc): now takes one-character string.
* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
hashing algorithm.
* string.c (rb_str_aref): str[0] now returns 1 character string,
instead of a fixnum. [Ruby2]
* parse.y (parser_yylex): ?c now returns 1 character string,
instead of a fixnum. [Ruby2]
* string.c (rb_str_aset): no longer support fixnum insertion.
* eval.c (umethod_bind): should not update original class.
[ruby-dev:28636]
* eval.c (ev_const_get): should support constant access from
within instance_eval(). [ruby-dev:28327]
* time.c (time_timeval): should round for usec floating
number. [ruby-core:07896]
* time.c (time_add): ditto.
* dir.c (sys_warning): should not call a vararg function
rb_sys_warning() indirectly. [ruby-core:07886]
* numeric.c (flo_divmod): the first element of Float#divmod should
be an integer. [ruby-dev:28589]
* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.
* re.c (rb_reg_initialize): should not allow modifying literal
regexps. frozen check moved from rb_reg_initialize_m as well.
* re.c (rb_reg_initialize): should not modify untainted objects in
safe levels higher than 3.
* re.c (rb_memcmp): type change from char* to const void*.
* dir.c (dir_close): should not close untainted dir stream.
* dir.c (GetDIR): add tainted/frozen check for each dir operation.
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
typo fixed. a patch from Florian Gross <florg at florg.net>.
* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
event_hooks. no guarantee for arbitrary hook deletion.
[ruby-dev:28632]
* util.c (ruby_strtod): differ addition to minimize error.
[ruby-dev:28619]
* util.c (ruby_strtod): should not raise ERANGE when the input
string does not have any digits. [ruby-dev:28629]
* eval.c (proc_invoke): should restore old ruby_frame->block.
thanks to ts <decoux at moulon.inra.fr>. [ruby-core:07833]
also fix [ruby-dev:28614] as well.
* signal.c (trap): sig should be less then NSIG. Coverity found
this bug. a patch from Kevin Tew <tewk at tewk.com>.
[ruby-core:07823]
* math.c (math_log2): add new method inspired by
[ruby-talk:191237].
* math.c (math_log): add optional base argument to Math::log().
[ruby-talk:191308]
* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
uninitialized array element. a patch from Pat Eyler
<rubypate at gmail.com>. [ruby-core:07809]
* array.c (rb_ary_fill): initialize local variables first. a
patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07810]
* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
type_tag. a patch from Pat Eyler <rubypate at gmail.com>.
[ruby-core:07808]
* ext/socket/socket.c (make_hostent_internal): accept ai_family
check from Sam Roberts <sroberts at uniserve.com>.
[ruby-core:07691]
* util.c (ruby_strtod): should not cut off 18 digits for no
reason. [ruby-core:07796]
* array.c (rb_ary_fill): internalize local variable "beg" to
pacify Coverity. [ruby-core:07770]
* pack.c (pack_unpack): now supports CRLF newlines. a patch from
<tommy at tmtm.org>. [ruby-dev:28601]
* applied code clean-up patch from Stefan Huehner
<stefan at huehner.org>. [ruby-core:07764]
* lib/jcode.rb (String::tr_s): should have translated non
squeezing character sequence (i.e. a character) as well. thanks
to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090]
* ext/socket/socket.c: document update patch from Sam Roberts
<sroberts at uniserve.com>. [ruby-core:07701]
* lib/mathn.rb (Integer): need not to remove gcd2. a patch from
NARUSE, Yui <naruse at airemix.com>. [ruby-dev:28570]
* parse.y (arg): too much NEW_LIST()
* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.
* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
[ruby-dev:28585]
* parse.y (arg): use NODE_ARGSCAT for placeholder.
* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
mathew <meta at pobox.com>. [ruby-core:07738]
* variable.c (rb_const_set): raise error when no target klass is
supplied. [ruby-dev:28582]
* prec.c (prec_prec_f): documentation patch from
<gerardo.santana at gmail.com>. [ruby-core:07689]
* bignum.c (rb_big_pow): second operand may be too big even if
it's a Fixnum. [ruby-talk:187984]
* README.EXT: update symbol description. [ruby-talk:188104]
* COPYING: explicitly note GPLv2. [ruby-talk:187922]
* parse.y: remove some obsolete syntax rules (unparenthesized
method calls in argument list).
* eval.c (rb_call0): insecure calling should be checked for non
NODE_SCOPE method invocations too.
* eval.c (rb_alias): should preserve the current safe level as
well as method definition.
* process.c (rb_f_sleep): remove RDoc description about SIGALRM
which is not valid on the current implementation. [ruby-dev:28464]
Thu Mar 23 21:40:47 2006 K.Kosako <sndgk393 AT ybb.ne.jp>
* eval.c (method_missing): should support argument splat in
super. a bug in combination of super, splat and
method_missing. [ruby-talk:185438]
* configure.in: Solaris SunPro compiler -rapth patch from
<kuwa at labs.fujitsu.com>. [ruby-dev:28443]
* configure.in: remove enable_rpath=no for Solaris.
[ruby-dev:28440]
* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
of converting OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
String object.
* ruby.1: a clarification patch from David Lutterkort
<dlutter at redhat.com>. [ruby-core:7508]
* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
directories. a patch from Eric Hodel <drbrain at segment7.net>.
[ruby-core:07423]
* eval.c (rb_clear_cache_by_class): clearing wrong cache.
* ext/extmk.rb: use :remove_destination to install extension libraries
to avoid SEGV. [ruby-dev:28417]
* eval.c (rb_thread_fd_writable): should not re-schedule output
from KILLED thread (must be error printing).
* array.c (rb_ary_flatten_bang): allow specifying recursion
level. [ruby-talk:182170]
* array.c (rb_ary_flatten): ditto.
* gc.c (add_heap): a heap_slots may overflow. a patch from Stefan
Weil <weil at mail.berlios.de>.
* eval.c (rb_call): use separate cache for fcall/vcall
invocation.
* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
functions.
* eval.c (rb_mod_local): a new method to specify newly added
visibility "local".
* eval.c (search_method): search for local methods which are
visible only from the current class.
* class.c (rb_class_local_methods): a method to list local methods.
* object.c (Init_Object): add BasicObject class as a top level
BlankSlate class.
* ruby.h (SYM2ID): should not cast to signed long.
[ruby-core:07414]
* class.c (rb_include_module): allow module duplication.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-10 01:20:17 +04:00
|
|
|
#define NEW_POSTARG(r,m) NEW_NODE(NODE_POSTARG,m,0,r)
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_ARGSCAT(a,b) NEW_NODE(NODE_ARGSCAT,a,b,0)
|
|
|
|
#define NEW_ARGSPUSH(a,b) NEW_NODE(NODE_ARGSPUSH,a,b,0)
|
|
|
|
#define NEW_SPLAT(a) NEW_NODE(NODE_SPLAT,a,0,0)
|
2003-10-06 21:59:53 +04:00
|
|
|
#define NEW_TO_ARY(a) NEW_NODE(NODE_TO_ARY,a,0,0)
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_BLOCK_ARG(v) NEW_NODE(NODE_BLOCK_ARG,v,0,local_cnt(v))
|
|
|
|
#define NEW_BLOCK_PASS(b) NEW_NODE(NODE_BLOCK_PASS,0,b,0)
|
2004-10-30 10:56:18 +04:00
|
|
|
#define NEW_ALIAS(n,o) NEW_NODE(NODE_ALIAS,n,o,0)
|
|
|
|
#define NEW_VALIAS(n,o) NEW_NODE(NODE_VALIAS,n,o,0)
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_UNDEF(i) NEW_NODE(NODE_UNDEF,0,i,0)
|
|
|
|
#define NEW_CLASS(n,b,s) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(b),(s))
|
|
|
|
#define NEW_SCLASS(r,b) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(b),0)
|
|
|
|
#define NEW_MODULE(n,b) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(b),0)
|
|
|
|
#define NEW_COLON2(c,i) NEW_NODE(NODE_COLON2,c,i,0)
|
|
|
|
#define NEW_COLON3(i) NEW_NODE(NODE_COLON3,0,i,0)
|
|
|
|
#define NEW_DOT2(b,e) NEW_NODE(NODE_DOT2,b,e,0)
|
|
|
|
#define NEW_DOT3(b,e) NEW_NODE(NODE_DOT3,b,e,0)
|
|
|
|
#define NEW_ATTRSET(a) NEW_NODE(NODE_ATTRSET,a,0,0)
|
|
|
|
#define NEW_SELF() NEW_NODE(NODE_SELF,0,0,0)
|
|
|
|
#define NEW_NIL() NEW_NODE(NODE_NIL,0,0,0)
|
|
|
|
#define NEW_TRUE() NEW_NODE(NODE_TRUE,0,0,0)
|
|
|
|
#define NEW_FALSE() NEW_NODE(NODE_FALSE,0,0,0)
|
2004-01-22 11:31:33 +03:00
|
|
|
#define NEW_ERRINFO() NEW_NODE(NODE_ERRINFO,0,0,0)
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_DEFINED(e) NEW_NODE(NODE_DEFINED,e,0,0)
|
1998-01-16 15:19:22 +03:00
|
|
|
#define NEW_PREEXE(b) NEW_SCOPE(b)
|
2006-02-03 12:15:42 +03:00
|
|
|
#define NEW_POSTEXE(b) NEW_NODE(NODE_POSTEXE,0,b,0)
|
2003-07-04 19:30:35 +04:00
|
|
|
#define NEW_BMETHOD(b) NEW_NODE(NODE_BMETHOD,0,0,b)
|
|
|
|
#define NEW_ATTRASGN(r,m,a) NEW_NODE(NODE_ATTRASGN,r,m,a)
|
2004-09-22 04:19:15 +04:00
|
|
|
#define NEW_PRELUDE(p,b) NEW_NODE(NODE_PRELUDE,p,b,0)
|
1998-01-16 15:13:05 +03:00
|
|
|
|
1999-01-20 07:59:39 +03:00
|
|
|
#define NOEX_PUBLIC 0
|
2002-11-07 22:18:16 +03:00
|
|
|
#define NOEX_NOSUPER 1
|
1999-01-20 07:59:39 +03:00
|
|
|
#define NOEX_PRIVATE 2
|
|
|
|
#define NOEX_PROTECTED 4
|
* sprintf.c (rb_str_format): allow %c to print one character
string (e.g. ?x).
* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
basename and pid. [ruby-talk:196272]
* parse.y (do_block): remove -> style block.
* parse.y (parser_yylex): remove tLAMBDA_ARG.
* eval.c (rb_call0): binding for the return event hook should have
consistent scope. [ruby-core:07928]
* eval.c (proc_invoke): return behavior should depend whether it
is surrounded by a lambda or a mere block.
* eval.c (formal_assign): handles post splat arguments.
* eval.c (rb_call0): ditto.
* st.c (strhash): use FNV-1a hash.
* parse.y (parser_yylex): removed experimental ';;' terminator.
* eval.c (rb_node_arity): should be aware of post splat arguments.
* eval.c (rb_proc_arity): ditto.
* parse.y (f_args): syntax rule enhanced to support arguments
after the splat.
* parse.y (block_param): ditto for block parameters.
* parse.y (f_post_arg): mandatory formal arguments after the splat
argument.
* parse.y (new_args_gen): generate nodes for mandatory formal
arguments after the splat argument.
* eval.c (rb_eval): dispatch mandatory formal arguments after the
splat argument.
* parse.y (args): allow more than one splat in the argument list.
* parse.y (method_call): allow aref [] to accept all kind of
method argument, including assocs, splat, and block argument.
* eval.c (SETUP_ARGS0): prepare block argument as well.
* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]
* eval.c (error_line): print receivers true/false/nil specially.
* eval.c (rb_proc_yield): handles parameters in yield semantics.
* eval.c (nil_yield): gives LocalJumpError to denote no block
error.
* io.c (rb_io_getc): now takes one-character string.
* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
hashing algorithm.
* string.c (rb_str_aref): str[0] now returns 1 character string,
instead of a fixnum. [Ruby2]
* parse.y (parser_yylex): ?c now returns 1 character string,
instead of a fixnum. [Ruby2]
* string.c (rb_str_aset): no longer support fixnum insertion.
* eval.c (umethod_bind): should not update original class.
[ruby-dev:28636]
* eval.c (ev_const_get): should support constant access from
within instance_eval(). [ruby-dev:28327]
* time.c (time_timeval): should round for usec floating
number. [ruby-core:07896]
* time.c (time_add): ditto.
* dir.c (sys_warning): should not call a vararg function
rb_sys_warning() indirectly. [ruby-core:07886]
* numeric.c (flo_divmod): the first element of Float#divmod should
be an integer. [ruby-dev:28589]
* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.
* re.c (rb_reg_initialize): should not allow modifying literal
regexps. frozen check moved from rb_reg_initialize_m as well.
* re.c (rb_reg_initialize): should not modify untainted objects in
safe levels higher than 3.
* re.c (rb_memcmp): type change from char* to const void*.
* dir.c (dir_close): should not close untainted dir stream.
* dir.c (GetDIR): add tainted/frozen check for each dir operation.
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
typo fixed. a patch from Florian Gross <florg at florg.net>.
* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
event_hooks. no guarantee for arbitrary hook deletion.
[ruby-dev:28632]
* util.c (ruby_strtod): differ addition to minimize error.
[ruby-dev:28619]
* util.c (ruby_strtod): should not raise ERANGE when the input
string does not have any digits. [ruby-dev:28629]
* eval.c (proc_invoke): should restore old ruby_frame->block.
thanks to ts <decoux at moulon.inra.fr>. [ruby-core:07833]
also fix [ruby-dev:28614] as well.
* signal.c (trap): sig should be less then NSIG. Coverity found
this bug. a patch from Kevin Tew <tewk at tewk.com>.
[ruby-core:07823]
* math.c (math_log2): add new method inspired by
[ruby-talk:191237].
* math.c (math_log): add optional base argument to Math::log().
[ruby-talk:191308]
* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
uninitialized array element. a patch from Pat Eyler
<rubypate at gmail.com>. [ruby-core:07809]
* array.c (rb_ary_fill): initialize local variables first. a
patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07810]
* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
type_tag. a patch from Pat Eyler <rubypate at gmail.com>.
[ruby-core:07808]
* ext/socket/socket.c (make_hostent_internal): accept ai_family
check from Sam Roberts <sroberts at uniserve.com>.
[ruby-core:07691]
* util.c (ruby_strtod): should not cut off 18 digits for no
reason. [ruby-core:07796]
* array.c (rb_ary_fill): internalize local variable "beg" to
pacify Coverity. [ruby-core:07770]
* pack.c (pack_unpack): now supports CRLF newlines. a patch from
<tommy at tmtm.org>. [ruby-dev:28601]
* applied code clean-up patch from Stefan Huehner
<stefan at huehner.org>. [ruby-core:07764]
* lib/jcode.rb (String::tr_s): should have translated non
squeezing character sequence (i.e. a character) as well. thanks
to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090]
* ext/socket/socket.c: document update patch from Sam Roberts
<sroberts at uniserve.com>. [ruby-core:07701]
* lib/mathn.rb (Integer): need not to remove gcd2. a patch from
NARUSE, Yui <naruse at airemix.com>. [ruby-dev:28570]
* parse.y (arg): too much NEW_LIST()
* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.
* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
[ruby-dev:28585]
* parse.y (arg): use NODE_ARGSCAT for placeholder.
* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
mathew <meta at pobox.com>. [ruby-core:07738]
* variable.c (rb_const_set): raise error when no target klass is
supplied. [ruby-dev:28582]
* prec.c (prec_prec_f): documentation patch from
<gerardo.santana at gmail.com>. [ruby-core:07689]
* bignum.c (rb_big_pow): second operand may be too big even if
it's a Fixnum. [ruby-talk:187984]
* README.EXT: update symbol description. [ruby-talk:188104]
* COPYING: explicitly note GPLv2. [ruby-talk:187922]
* parse.y: remove some obsolete syntax rules (unparenthesized
method calls in argument list).
* eval.c (rb_call0): insecure calling should be checked for non
NODE_SCOPE method invocations too.
* eval.c (rb_alias): should preserve the current safe level as
well as method definition.
* process.c (rb_f_sleep): remove RDoc description about SIGALRM
which is not valid on the current implementation. [ruby-dev:28464]
Thu Mar 23 21:40:47 2006 K.Kosako <sndgk393 AT ybb.ne.jp>
* eval.c (method_missing): should support argument splat in
super. a bug in combination of super, splat and
method_missing. [ruby-talk:185438]
* configure.in: Solaris SunPro compiler -rapth patch from
<kuwa at labs.fujitsu.com>. [ruby-dev:28443]
* configure.in: remove enable_rpath=no for Solaris.
[ruby-dev:28440]
* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
of converting OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
String object.
* ruby.1: a clarification patch from David Lutterkort
<dlutter at redhat.com>. [ruby-core:7508]
* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
directories. a patch from Eric Hodel <drbrain at segment7.net>.
[ruby-core:07423]
* eval.c (rb_clear_cache_by_class): clearing wrong cache.
* ext/extmk.rb: use :remove_destination to install extension libraries
to avoid SEGV. [ruby-dev:28417]
* eval.c (rb_thread_fd_writable): should not re-schedule output
from KILLED thread (must be error printing).
* array.c (rb_ary_flatten_bang): allow specifying recursion
level. [ruby-talk:182170]
* array.c (rb_ary_flatten): ditto.
* gc.c (add_heap): a heap_slots may overflow. a patch from Stefan
Weil <weil at mail.berlios.de>.
* eval.c (rb_call): use separate cache for fcall/vcall
invocation.
* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
functions.
* eval.c (rb_mod_local): a new method to specify newly added
visibility "local".
* eval.c (search_method): search for local methods which are
visible only from the current class.
* class.c (rb_class_local_methods): a method to list local methods.
* object.c (Init_Object): add BasicObject class as a top level
BlankSlate class.
* ruby.h (SYM2ID): should not cast to signed long.
[ruby-core:07414]
* class.c (rb_include_module): allow module duplication.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-10 01:20:17 +04:00
|
|
|
#define NOEX_LOCAL 8
|
|
|
|
#define NOEX_MASK 14
|
1998-01-16 15:13:05 +03:00
|
|
|
|
2002-11-07 22:18:16 +03:00
|
|
|
#define NOEX_UNDEF NOEX_NOSUPER
|
* sprintf.c (rb_str_format): allow %c to print one character
string (e.g. ?x).
* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
basename and pid. [ruby-talk:196272]
* parse.y (do_block): remove -> style block.
* parse.y (parser_yylex): remove tLAMBDA_ARG.
* eval.c (rb_call0): binding for the return event hook should have
consistent scope. [ruby-core:07928]
* eval.c (proc_invoke): return behavior should depend whether it
is surrounded by a lambda or a mere block.
* eval.c (formal_assign): handles post splat arguments.
* eval.c (rb_call0): ditto.
* st.c (strhash): use FNV-1a hash.
* parse.y (parser_yylex): removed experimental ';;' terminator.
* eval.c (rb_node_arity): should be aware of post splat arguments.
* eval.c (rb_proc_arity): ditto.
* parse.y (f_args): syntax rule enhanced to support arguments
after the splat.
* parse.y (block_param): ditto for block parameters.
* parse.y (f_post_arg): mandatory formal arguments after the splat
argument.
* parse.y (new_args_gen): generate nodes for mandatory formal
arguments after the splat argument.
* eval.c (rb_eval): dispatch mandatory formal arguments after the
splat argument.
* parse.y (args): allow more than one splat in the argument list.
* parse.y (method_call): allow aref [] to accept all kind of
method argument, including assocs, splat, and block argument.
* eval.c (SETUP_ARGS0): prepare block argument as well.
* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]
* eval.c (error_line): print receivers true/false/nil specially.
* eval.c (rb_proc_yield): handles parameters in yield semantics.
* eval.c (nil_yield): gives LocalJumpError to denote no block
error.
* io.c (rb_io_getc): now takes one-character string.
* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
hashing algorithm.
* string.c (rb_str_aref): str[0] now returns 1 character string,
instead of a fixnum. [Ruby2]
* parse.y (parser_yylex): ?c now returns 1 character string,
instead of a fixnum. [Ruby2]
* string.c (rb_str_aset): no longer support fixnum insertion.
* eval.c (umethod_bind): should not update original class.
[ruby-dev:28636]
* eval.c (ev_const_get): should support constant access from
within instance_eval(). [ruby-dev:28327]
* time.c (time_timeval): should round for usec floating
number. [ruby-core:07896]
* time.c (time_add): ditto.
* dir.c (sys_warning): should not call a vararg function
rb_sys_warning() indirectly. [ruby-core:07886]
* numeric.c (flo_divmod): the first element of Float#divmod should
be an integer. [ruby-dev:28589]
* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.
* re.c (rb_reg_initialize): should not allow modifying literal
regexps. frozen check moved from rb_reg_initialize_m as well.
* re.c (rb_reg_initialize): should not modify untainted objects in
safe levels higher than 3.
* re.c (rb_memcmp): type change from char* to const void*.
* dir.c (dir_close): should not close untainted dir stream.
* dir.c (GetDIR): add tainted/frozen check for each dir operation.
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
typo fixed. a patch from Florian Gross <florg at florg.net>.
* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
event_hooks. no guarantee for arbitrary hook deletion.
[ruby-dev:28632]
* util.c (ruby_strtod): differ addition to minimize error.
[ruby-dev:28619]
* util.c (ruby_strtod): should not raise ERANGE when the input
string does not have any digits. [ruby-dev:28629]
* eval.c (proc_invoke): should restore old ruby_frame->block.
thanks to ts <decoux at moulon.inra.fr>. [ruby-core:07833]
also fix [ruby-dev:28614] as well.
* signal.c (trap): sig should be less then NSIG. Coverity found
this bug. a patch from Kevin Tew <tewk at tewk.com>.
[ruby-core:07823]
* math.c (math_log2): add new method inspired by
[ruby-talk:191237].
* math.c (math_log): add optional base argument to Math::log().
[ruby-talk:191308]
* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
uninitialized array element. a patch from Pat Eyler
<rubypate at gmail.com>. [ruby-core:07809]
* array.c (rb_ary_fill): initialize local variables first. a
patch from Pat Eyler <rubypate at gmail.com>. [ruby-core:07810]
* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
type_tag. a patch from Pat Eyler <rubypate at gmail.com>.
[ruby-core:07808]
* ext/socket/socket.c (make_hostent_internal): accept ai_family
check from Sam Roberts <sroberts at uniserve.com>.
[ruby-core:07691]
* util.c (ruby_strtod): should not cut off 18 digits for no
reason. [ruby-core:07796]
* array.c (rb_ary_fill): internalize local variable "beg" to
pacify Coverity. [ruby-core:07770]
* pack.c (pack_unpack): now supports CRLF newlines. a patch from
<tommy at tmtm.org>. [ruby-dev:28601]
* applied code clean-up patch from Stefan Huehner
<stefan at huehner.org>. [ruby-core:07764]
* lib/jcode.rb (String::tr_s): should have translated non
squeezing character sequence (i.e. a character) as well. thanks
to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090]
* ext/socket/socket.c: document update patch from Sam Roberts
<sroberts at uniserve.com>. [ruby-core:07701]
* lib/mathn.rb (Integer): need not to remove gcd2. a patch from
NARUSE, Yui <naruse at airemix.com>. [ruby-dev:28570]
* parse.y (arg): too much NEW_LIST()
* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.
* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
[ruby-dev:28585]
* parse.y (arg): use NODE_ARGSCAT for placeholder.
* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
mathew <meta at pobox.com>. [ruby-core:07738]
* variable.c (rb_const_set): raise error when no target klass is
supplied. [ruby-dev:28582]
* prec.c (prec_prec_f): documentation patch from
<gerardo.santana at gmail.com>. [ruby-core:07689]
* bignum.c (rb_big_pow): second operand may be too big even if
it's a Fixnum. [ruby-talk:187984]
* README.EXT: update symbol description. [ruby-talk:188104]
* COPYING: explicitly note GPLv2. [ruby-talk:187922]
* parse.y: remove some obsolete syntax rules (unparenthesized
method calls in argument list).
* eval.c (rb_call0): insecure calling should be checked for non
NODE_SCOPE method invocations too.
* eval.c (rb_alias): should preserve the current safe level as
well as method definition.
* process.c (rb_f_sleep): remove RDoc description about SIGALRM
which is not valid on the current implementation. [ruby-dev:28464]
Thu Mar 23 21:40:47 2006 K.Kosako <sndgk393 AT ybb.ne.jp>
* eval.c (method_missing): should support argument splat in
super. a bug in combination of super, splat and
method_missing. [ruby-talk:185438]
* configure.in: Solaris SunPro compiler -rapth patch from
<kuwa at labs.fujitsu.com>. [ruby-dev:28443]
* configure.in: remove enable_rpath=no for Solaris.
[ruby-dev:28440]
* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
of converting OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
String object.
* ruby.1: a clarification patch from David Lutterkort
<dlutter at redhat.com>. [ruby-core:7508]
* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
directories. a patch from Eric Hodel <drbrain at segment7.net>.
[ruby-core:07423]
* eval.c (rb_clear_cache_by_class): clearing wrong cache.
* ext/extmk.rb: use :remove_destination to install extension libraries
to avoid SEGV. [ruby-dev:28417]
* eval.c (rb_thread_fd_writable): should not re-schedule output
from KILLED thread (must be error printing).
* array.c (rb_ary_flatten_bang): allow specifying recursion
level. [ruby-talk:182170]
* array.c (rb_ary_flatten): ditto.
* gc.c (add_heap): a heap_slots may overflow. a patch from Stefan
Weil <weil at mail.berlios.de>.
* eval.c (rb_call): use separate cache for fcall/vcall
invocation.
* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
functions.
* eval.c (rb_mod_local): a new method to specify newly added
visibility "local".
* eval.c (search_method): search for local methods which are
visible only from the current class.
* class.c (rb_class_local_methods): a method to list local methods.
* object.c (Init_Object): add BasicObject class as a top level
BlankSlate class.
* ruby.h (SYM2ID): should not cast to signed long.
[ruby-core:07414]
* class.c (rb_include_module): allow module duplication.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-10 01:20:17 +04:00
|
|
|
#define NOEX_RECV 16
|
2002-11-07 22:18:16 +03:00
|
|
|
|
* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c,
gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h,
node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h,
rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c,
util.c, util.h, variable.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14 10:32:32 +04:00
|
|
|
VALUE rb_parser_new(void);
|
|
|
|
VALUE rb_parser_end_seen_p(VALUE);
|
2005-07-13 17:44:21 +04:00
|
|
|
|
2005-11-29 17:57:18 +03:00
|
|
|
NODE *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int);
|
|
|
|
NODE *rb_parser_compile_string(VALUE, const char*, VALUE, int);
|
|
|
|
NODE *rb_parser_compile_file(VALUE, const char*, VALUE, int);
|
2005-07-13 17:44:21 +04:00
|
|
|
|
* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c,
gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h,
node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h,
rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c,
util.c, util.h, variable.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14 10:32:32 +04:00
|
|
|
NODE *rb_compile_cstr(const char*, const char*, int, int);
|
|
|
|
NODE *rb_compile_string(const char*, VALUE, int);
|
|
|
|
NODE *rb_compile_file(const char*, VALUE, int);
|
1998-01-16 15:19:22 +03:00
|
|
|
|
* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c,
gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h,
node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h,
rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c,
util.c, util.h, variable.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14 10:32:32 +04:00
|
|
|
void rb_add_method(VALUE, ID, NODE *, int);
|
|
|
|
NODE *rb_node_newnode(enum node_type,VALUE,VALUE,VALUE);
|
1998-01-16 15:19:22 +03:00
|
|
|
|
* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c,
gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h,
node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h,
rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c,
util.c, util.h, variable.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14 10:32:32 +04:00
|
|
|
NODE* rb_method_node(VALUE klass, ID id);
|
|
|
|
int rb_node_arity(NODE* node);
|
2003-11-15 02:54:06 +03:00
|
|
|
|
* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c,
gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h,
node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h,
rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c,
util.c, util.h, variable.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14 10:32:32 +04:00
|
|
|
struct global_entry *rb_global_entry(ID);
|
|
|
|
VALUE rb_gvar_get(struct global_entry *);
|
|
|
|
VALUE rb_gvar_set(struct global_entry *, VALUE);
|
|
|
|
VALUE rb_gvar_defined(struct global_entry *);
|
1998-01-16 15:13:05 +03:00
|
|
|
|
2005-03-16 16:05:46 +03:00
|
|
|
typedef unsigned int rb_event_t;
|
|
|
|
|
|
|
|
#define RUBY_EVENT_NONE 0x00
|
|
|
|
#define RUBY_EVENT_LINE 0x01
|
|
|
|
#define RUBY_EVENT_CLASS 0x02
|
|
|
|
#define RUBY_EVENT_END 0x04
|
|
|
|
#define RUBY_EVENT_CALL 0x08
|
|
|
|
#define RUBY_EVENT_RETURN 0x10
|
|
|
|
#define RUBY_EVENT_C_CALL 0x20
|
|
|
|
#define RUBY_EVENT_C_RETURN 0x40
|
|
|
|
#define RUBY_EVENT_RAISE 0x80
|
|
|
|
#define RUBY_EVENT_ALL 0xff
|
|
|
|
|
* bignum.c: changed `foo _((boo))' to `foo(boo)`. [ruby-dev:27056]
* defines.h, dir.c, dln.h, enumerator.c, env.h, error.c, eval.c, file.c,
gc.c, hash.c, inits.c, intern.h, io.c, lex.c, marshal.c, missing.h,
node.h, numeric.c, pack.c, process.c, re.h, ruby.c, ruby.h, rubyio.h,
rubysig.h, signal.c, sprintf.c, st.h, string.c, struct.c, time.c,
util.c, util.h, variable.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-14 10:32:32 +04:00
|
|
|
typedef void (*rb_event_hook_func_t)(rb_event_t,NODE*,VALUE,ID,VALUE);
|
|
|
|
void rb_add_event_hook(rb_event_hook_func_t,rb_event_t);
|
|
|
|
int rb_remove_event_hook(rb_event_hook_func_t);
|
2005-03-16 16:05:46 +03:00
|
|
|
|
2006-09-24 01:29:47 +04:00
|
|
|
#if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT)
|
|
|
|
#include <ucontext.h>
|
|
|
|
#define USE_CONTEXT
|
|
|
|
#endif
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include "st.h"
|
|
|
|
|
|
|
|
#ifdef USE_CONTEXT
|
|
|
|
typedef struct {
|
|
|
|
ucontext_t context;
|
|
|
|
volatile int status;
|
|
|
|
} rb_jmpbuf_t[1];
|
|
|
|
#else
|
|
|
|
typedef jmp_buf rb_jmpbuf_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
enum thread_status {
|
|
|
|
THREAD_TO_KILL,
|
|
|
|
THREAD_RUNNABLE,
|
|
|
|
THREAD_STOPPED,
|
|
|
|
THREAD_KILLED,
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct thread * rb_thread_t;
|
|
|
|
|
|
|
|
struct thread {
|
|
|
|
struct thread *next, *prev;
|
|
|
|
rb_jmpbuf_t context;
|
2006-09-28 19:01:04 +04:00
|
|
|
#if (defined _WIN32 && !defined _WIN32_WCE) || defined __CYGWIN__
|
|
|
|
unsigned long win32_exception_list;
|
2006-09-24 01:29:47 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
VALUE result;
|
|
|
|
|
|
|
|
long stk_len;
|
|
|
|
long stk_max;
|
|
|
|
VALUE *stk_ptr;
|
|
|
|
VALUE *stk_pos;
|
|
|
|
#ifdef __ia64
|
|
|
|
long bstr_len;
|
|
|
|
long bstr_max;
|
|
|
|
VALUE *bstr_ptr;
|
|
|
|
VALUE *bstr_pos;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct FRAME *frame;
|
|
|
|
struct SCOPE *scope;
|
|
|
|
struct RVarmap *dyna_vars;
|
|
|
|
struct BLOCK *block;
|
|
|
|
struct iter *iter;
|
|
|
|
struct tag *tag;
|
|
|
|
VALUE wrapper;
|
|
|
|
NODE *cref;
|
|
|
|
struct ruby_env *anchor;
|
|
|
|
|
|
|
|
int flags; /* misc. states (rb_trap_immediate/raised) */
|
|
|
|
|
|
|
|
NODE *node;
|
|
|
|
|
|
|
|
int tracing;
|
|
|
|
VALUE errinfo;
|
|
|
|
VALUE last_status;
|
|
|
|
VALUE last_line;
|
|
|
|
VALUE last_match;
|
|
|
|
|
|
|
|
int safe;
|
|
|
|
|
|
|
|
enum thread_status status;
|
|
|
|
int wait_for;
|
|
|
|
int fd;
|
|
|
|
rb_fdset_t readfds;
|
|
|
|
rb_fdset_t writefds;
|
|
|
|
rb_fdset_t exceptfds;
|
|
|
|
int select_value;
|
|
|
|
double delay;
|
|
|
|
rb_thread_t join;
|
|
|
|
|
|
|
|
int abort;
|
|
|
|
int priority;
|
|
|
|
VALUE thgroup;
|
|
|
|
|
|
|
|
st_table *locals;
|
|
|
|
|
|
|
|
VALUE thread;
|
|
|
|
|
|
|
|
VALUE sandbox;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern VALUE (*ruby_sandbox_save)(struct thread *);
|
|
|
|
extern VALUE (*ruby_sandbox_restore)(struct thread *);
|
|
|
|
extern rb_thread_t curr_thread;
|
|
|
|
extern rb_thread_t main_thread;
|
|
|
|
|
1999-10-29 13:25:48 +04:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
} /* extern "C" { */
|
|
|
|
#endif
|
|
|
|
|
1998-01-16 15:13:05 +03:00
|
|
|
#endif
|