Граф коммитов

406 Коммитов

Автор SHA1 Сообщение Дата
matz bde7125880 * parse.y (parser_yylex): update paren_nest for brackets [].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-20 15:44:54 +00:00
matz 17957e0dfc * eval.c (rb_add_method): preserve safe level in the environment
where a method is defined .

* eval.c (rb_call0): restore preserved safe level in the method
  execution.

* parse.y (lambda): need separate block variable stack
  manipulation and lpar_beg maintenance.  based on a patch found
  in [ruby-core:05551] from Mauricio Fernandez <mfp@acm.org>.

* parse.y (parser_yylex): adjust lpar_beg after tLAMBEG and
  kDO_LAMBDA. [ruby-core:05551]

* parse.y (yycompile): remove unreachable code.  [yarv-dev:570]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-16 15:24:15 +00:00
matz e439bc27dc * parse.y (f_larglist): allow optional arguments even when
parentheses are omitted.  based on Nobu's patch from
  http://www.rubyist.net/~nobu/t/20050805.html

* parse.y (parser_yylex): update & maintain lpar_beg for detect
  lambda parameters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-12 08:13:28 +00:00
matz 160055b474 * bignum.c (rb_big_mul0): multiply two numbers (x, y) without
normalizing the result.  x should be a big number.
  [ruby-dev:26778]

* bignum.c (rb_big_pow): use rb_big_mul0() instead of
  rb_big_mul().

* array.c (rb_ary_or, rb_ary_and, rb_ary_plus, rb_ary_diff):
  revert the change on 2005-08-03.  Set operation on other item
  should have in separate methods.

* parse.y (shadowing_lvar_gen): warn when arguments shadows
  external local variables.

* parse.y (f_opt): optional arguments should not clobber external
  local variables.

* parse.y (f_rest_arg): rest arguments should not clobber external
  local variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-10 01:39:24 +00:00
nobu 09d57b8e0c * parse.y (f_block_arg), eval.c (rb_yield_0): deal with dynamic
variable lambda arguments.  [ruby-core:05540]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08 23:24:29 +00:00
matz 0b1038f514 * parse.y (f_larglist): mistake in syntax rule. [ruby-core:05535]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08 01:21:48 +00:00
nobu 710b99a16b * eval.c (formal_assign): returns position of rest arguments variable.
* parse.y (f_rest_arg): use anonymous variable for rest arguments.
  fixed: [ruby-dev:26647]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 15:18:38 +00:00
nobu 396e297f2d * eval.c (rb_call0): fix calling zsuper from a method with anonymous
rest argument.  [ruby-dev:26639]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-29 00:58:14 +00:00
nobu b4fef39a40 * parse.y (rb_parser_end_seen_p): exclude from ripper.
<http://moonrock.jp/~don/d/200507.html#d28_t2>

* sprintf.c (clearerr): remove standard macro before re-definition.
  <http://moonrock.jp/~don/d/200507.html#d28_t3>


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-28 12:49:31 +00:00
matz 501fdc09d8 * parse.y (f_larglist): allow block argument in lambda parameter
list without parenthesis.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-28 08:25:05 +00:00
matz 727e443c4b * parse.y (f_arg): better argument name duplication check
* parse.y (new_args_gen): factored out name duplication check for
  optional and rest arguments.

* parse.y (new_bv_gen): allow shadowing outer local variables;
  warning remains.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-28 07:16:22 +00:00
matz 989b0a6d1e * parse.y (f_larglist): allow bv_decl at the end of lambda
argument list.  [EXPERIMENTAL]

* parse.y (new_bv_gen): allow local variable shadowing, with
  warning in verbose mode.

* ext/socket/socket.c (ruby_connect): break immediately if a
  socket is non-blocking.  [ruby-talk:111654]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-28 02:33:28 +00:00
matz bd3404ced0 * gc.c (obj_free): make message formant consistent with one from
gc_mark().  [ruby-talk:149668]

* sprintf.c (quad_t): prepare quad_t as well.  [ruby-talk:149668]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 14:30:09 +00:00
matz 759a63b6a3 * parse.y (lambda): Perl6 style -> lambda expression. [NEW]
[VERY EXPERIMENTAL]

* gc.c (id2ref): must not assign pointers to long int.  use
  LONG_LONG instead if SIZEOF_LONG < SIZEOF_VOIDP.
  [ruby-talk:149645]

* ruby.h: use LONG_LONG to simplify the change.
  [ruby-talk:149645]

* dir.c (dir_each): rewinddir(3) before iteration.
  [ruby-talk:149628]

* eval.c (rb_f_throw): replace all '0x%lx' by '%p'.
  [ruby-talk:149553]

* missing/vsnprintf.c (BSD_vfprintf): '%p' need to handle 64bit
  size pointer.  [ruby-talk:149553]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 07:27:19 +00:00
nobu 6524f34a26 * sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String,
using missing/vsnprintf.c.  [ruby-dev:26580]

*  missing/vsnprintf.c: made the output changeable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-23 01:02:18 +00:00
nobu 032248d337 * parse.y: remove static variables. [ruby-dev:26530]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-13 13:44:21 +00:00
matz 639bd5e78f * 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/trunk@8676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-30 06:20:09 +00:00
ocean 08133b1344 * dir.c, eval.c, parse.y, process.c, ruby.c: avoid warning "unused
variable" [ruby-dev:26387]

* dir.c (glob_helper): avoid warning "enumeration value `RECURSIVE'
  not handled in switch" [ruby-dev:26392]

(patch from Kazuhiro NISHIYAMA)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-28 13:08:32 +00:00
matz 8db3dc39d6 * signal.c (sigexit): call rb_thread_signal_exit() instead of
rb_exit().  [ruby-dev:26347]

* eval.c (rb_thread_signal_exit): a new function to exit on main
  thread.

* eval.c (rb_thread_switch): exit status should be retrieved from
  ruby_errinfo.

* eval.c (rb_f_exit): ensure exit(0) should call
  exit(EXIT_SUCCESS).

* missing/mkdir.c: remove. [ruby-core:05177]

* hash.c (env_aset): do not treat nil as key-removing value.
  [ruby-list:40865]

* parse.y (method_call): allow aref expression ([]) to take a
  block.

* parse.y (block_dup_check): a function to check duplication of
  a block argument and an actual block.

* lib/delegate.rb (SimpleDelegator::__setobj__): need check for
  recursive delegation.  [ruby-core:04940]

* lib/cgi.rb: add underscore aliases CGI::escape_html,
  CGI::unescape_html, CGI::escape_element, CGI::unescape_element.
  [ruby-core:05058]

* misc/ruby-mode.el (ruby-expr-beg): fix looking point drift.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-12 16:56:06 +00:00
aamine cc5f78419c * parse.y: missing arg_paren event. This patch is contributed by Mitchell N Charity.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-11 13:46:39 +00:00
matz a99cc44c8d * parse.y (parser_yylex): small error fixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-07 08:35:04 +00:00
matz 549c345cef * parse.y (parser_yylex): allow ';;' to be block terminator in
place of 'end'.  [highly experimental]

* misc/ruby-mode.el (ruby-block-end-re): allow ';;' for a negative
  indent trigger.  [highly experimental]

* parse.y (parser_yylex): "respond_to?:foo" should be interpreted
  as "respond_to? :foo" at the command level.  [ruby-talk:144303]

* sprintf.c (rb_f_sprintf): raise exception on debug mode (-d),
  not verbose mode (-w/-w).  [ruby-core:05123]

* sprintf.c (rb_f_sprintf): warn always on verbose mode.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-07 08:22:42 +00:00
nobu d2a81a3aa3 * parse.y: pragma support on ripper. [ruby-dev:26266]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-02 14:43:10 +00:00
matz 34adacb036 * parse.y (method_call): new experiment: "(expr)(args...)" to
invoke "expr.call(args...)".  [EXPERIMENTAL]

* parse.y (command): revert implicit "call" for local variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-02 07:26:10 +00:00
nobu 21393f1b2d * intern.h, parse.y (ruby_pragma): removed. fixed: [ruby-dev:26198]
* parse.y (parser_pragma): pragma name was ignored.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-22 03:31:08 +00:00
nobu 6c2bce70a3 * parse.y (pragma_encoding): add prototype to suppress false warning
by VC.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-16 13:40:49 +00:00
nobu 434e8a3796 * intern.h (ruby_pragma): prototype. [ruby-core:04881]
* parse.y (parser_pragma): parse Emacsen hack.

* parse.y (parser_prepare): deal with specific syntax at the top.

* ruby.c (load_file): read the first line iff it started with shebang.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-14 02:48:07 +00:00
nobu 1ec656e349 * eval.c (rb_eval), parse.y (arg): reduce fixnum range literal at
parser.  fixed: [ruby-dev:26113]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-01 00:15:25 +00:00
aamine dd82fb6393 * parse.y [ripper] (regexp): dispatch regexp option. [ruby-Bugs:1688]
* ext/ripper/lib/core.rb: regenerated (interface changed).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-14 10:05:29 +00:00
shugo 1429223686 * parse.y (primary): fix lineno of rescue and ensure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-23 07:15:49 +00:00
matz 56b9f4da43 * struct.c (make_struct): allow non local-id field
names. [ruby-core:04575]

* struct.c (inspect_struct): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-17 08:56:36 +00:00
matz feda16cbd4 * eval.c (rb_call0): reorganize "return" event post.
* eval.c (return_jump): no need to post "return" event here.

* object.c (str_to_id): raise ArgumentError for NUL containing
  strings.

* parse.y (primary): wrong var node was set for NODE_LAMBDA.
  [ruby-core:04555]

* re.c (make_regexp): need to free internal regexp structure when
  compilation fails.  [ruby-talk:133228]

* parse.y (bv_decl): remove initialize rule from block local
  variable declaration.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-16 09:25:45 +00:00
matz f43cae2b05 * parse.y (gettable_gen): warns if VCALL name is used as
out-of-scope block local variable.  [EXPERIMENTAL]

* parse.y (opt_bv_decl): add explicit block local variable
  declaration.  raises error for name conflicts.  [EXPERIMENTAL]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-09 09:29:52 +00:00
matz 70bbad3cfd * array.c: replace rb_protect_inspect() and rb_inspecting_p() by
rb_exec_recursive() in eval.c.

* eval.c (rb_exec_recursive): new function.

* array.c (rb_ary_join): use rb_exec_recursive().

* array.c (rb_ary_inspect, rb_ary_hash): ditto.

* file.c (rb_file_join): ditto.

* hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto.

* io.c (rb_io_puts): ditto.

* object.c (rb_obj_inspect): ditto

* struct.c (rb_struct_inspect): ditto.

* lib/set.rb (SortedSet::setup): a hack to shut up warning.
  [ruby-talk:132866]

* lib/time.rb (Time::strptime): add new function.  inspired by
  [ruby-talk:132815].

* lib/parsedate.rb (ParseDate::strptime): ditto.

* regparse.c: move st_*_strend() functions from st.c.  fixed some
  potential memory leaks.

* exception error messages updated.  [ruby-core:04497]

* ext/socket/socket.c (Init_socket): add bunch of Socket
  constants.  Patch from Sam Roberts <sroberts@uniserve.com>.
  [ruby-core:04409]

* array.c (rb_ary_s_create): no need for negative argc check.
  [ruby-core:04463]

* array.c (rb_ary_unshift_m): ditto.

* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
  of StandardError class, not Exception class.  [ruby-core:04429]

* parse.y (fcall_gen): lvar(arg) will be evaluated as
  lvar.call(arg) when lvar is a defined local variable. [new]

* object.c (rb_class_initialize): call inherited method before
  calling initializing block.

* eval.c (rb_thread_start_1): initialize newly pushed frame.

* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
  fixed: [ruby-core:04444]

* eval.c (is_defined): NODE_IASGN is an assignment.

* ext/readline/readline.c (Readline.readline): use rl_outstream
  and rl_instream.  [ruby-dev:25699]

* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check
  [ruby-dev:25675]

* misc/ruby-mode.el: [ruby-core:04415]

* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]

* lib/rdoc/generators/ri_generator.rb: ditto.

* struct.c (make_struct): fixed: [ruby-core:04402]

* ext/curses/curses.c (window_color_set): [ruby-core:04393]

* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
  [ruby-talk:130092]

* object.c: [ruby-doc:818]

* parse.y (open_args): fix too verbose warnings for the space
  before argument parentheses.  [ruby-dev:25492]

* parse.y (parser_yylex): ditto.

* parse.y (parser_yylex): the first expression in the parentheses
  should not be a command.  [ruby-dev:25492]

* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]

* object.c (Init_Object): remove Object#type.  [ruby-core:04335]

* st.c (st_foreach): report success/failure by return value.
  [ruby-Bugs-1396]

* parse.y: forgot to initialize parser struct.  [ruby-dev:25492]

* parse.y (parser_yylex): no tLABEL on EXPR_BEG.
  [ruby-talk:127711]

* document updates - [ruby-core:04296], [ruby-core:04301],
  [ruby-core:04302], [ruby-core:04307]

* dir.c (rb_push_glob): should work for NUL delimited patterns.

* dir.c (rb_glob2): should aware of offset in the pattern.

* string.c (rb_str_new4): should propagate taintedness.

* env.h: rename member names in struct FRAME; last_func -> callee,
  orig_func -> this_func, last_class -> this_class.

* struct.c (rb_struct_set): use original method name, not callee
  name, to retrieve member slot.  [ruby-core:04268]

* time.c (time_strftime): protect from format modification from GC
  finalizers.

* object.c (Init_Object): remove rb_obj_id_obsolete()

* eval.c (rb_mod_define_method): incomplete subclass check.
  [ruby-dev:25464]

* gc.c (rb_data_object_alloc): klass may be NULL.
  [ruby-list:40498]

* bignum.c (rb_big_rand): should return positive random number.
  [ruby-dev:25401]

* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
  random bignums.  [ruby-dev:25396]

* variable.c (rb_autoload): [ruby-dev:25373]

* eval.c (svalue_to_avalue): [ruby-dev:25366]

* string.c (rb_str_justify): [ruby-dev:25367]

* io.c (rb_f_select): [ruby-dev:25312]

* ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072]

* struct.c (make_struct): [ruby-dev:25249]

* dir.c (dir_open_dir): new function.  [ruby-dev:25242]

* io.c (rb_f_open): add type check for return value from to_open.

* lib/pstore.rb (PStore#transaction): Use the empty content when a
  file is not found.  [ruby-dev:24561]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04 06:47:45 +00:00
nobu 6c0cc67bb2 * eval.c (rb_eval): [EXPERIMENTAL] NODE_LAMBDA implemented.
[ruby-dev:25780]

* node.h (NODE_LAMBDA): for literal Proc object.

* parse.y (expr): interpret mere do...end block as proc object.

* parse.y (primary): ditto, for brace block.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-02 03:21:31 +00:00
aamine 1f5721d854 * parse.y [ripper]: fix typo. [ruby-core:04494]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-26 21:08:24 +00:00
kosako 41d96dbd35 remove oniggnu.h (GNU regex API).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-26 08:05:06 +00:00
nobu 8c18a183c9 * parse.y (parser_yylex): identfier after dot must not be a variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-21 22:25:28 +00:00
nobu 891c4aa199 * keywords, parse.y: separate EXPR_VALUE from EXPR_BEG.
fixed: [ruby-core:04310], [ruby-core:04368]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-08 13:39:47 +00:00
ocean 09736c1621 * parse.y (BITSTACK_POP): workaround for bcc32 compiler's bug.
shift assignment operator '>>=' for __int64 in struct may
  generate collapsed code. [ruby-dev:25342]

* win32/win32.[ch]: failed to compile on bcc32 (and probably wince)
  [ruby-dev:25306]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-05 08:00:50 +00:00
aamine 77a0c51545 * parse.y: eliminate unused members in struct parser_params. [ruby-dev:25258] (again)
* parse.y: make parser_new() static.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-29 20:41:04 +00:00
nobu 9a6c901fc4 * parse.y (special_local_set): prevent the parser object from GC.
fixed: [ruby-dev:25252]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-20 01:52:06 +00:00
nobu e41a1c0f10 * parse.y (string_content): get rid of segfault at empty evstr.
fixed: [ruby-dev:25113]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08 02:46:39 +00:00
matz 83cb605d69 * object.c (convert_type): [ruby-core:03845]
* eval.c (rb_funcall_rescue): new function.

* object.c (rb_Array): avoid using rb_respond_to().

* object.c (rb_Integer): ditto.

* eval.c (get_backtrace): no conversion for nil.

* parse.y (reduce_nodes): empty body should return nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-29 06:09:40 +00:00
nobu fc20fdcbc8 * parse.y (f_rest_arg): store rest args into invisible local variabe
in order to get rid of SEGV at ZSUPER.  [ruby-dev:24913]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18 08:06:09 +00:00
matz b28b7933a8 * process.c (proc_getpgrp): prohibit for $SAFE=2.
[ruby-dev:24899]

* process.c (get_pid): ditto.  [ruby-dev:24904]

* process.c (get_ppid): ditto.

* array.c (rb_ary_delete): defer rb_ary_modify() until actual
  modification.  [ruby-dev:24901]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18 03:45:23 +00:00
matz 288ceaeec2 * re.c (rb_reg_initialize_m): should raise exception instead of
compile error.  [ruby-core:03755]

* string.c (rb_str_splice): move rb_str_modify() after
  StringValue(), which may alter the receiver.  [ruby-dev:24878]

* error.c (rb_error_frozen): now raise RuntimeError instead of
  TypeError.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-17 02:27:38 +00:00
ksaito 82cb9eaa3b * ascii.c, euc_jp.c, oniggnu.h, oniguruma.h, regcomp.c, regenc.c, regenc.h, regerror.c, regexec.c, reggnu.c, regint.h, regparse.c, regparse.h, sjis.c, utf8.c:
imported Oni Guruma 3.4.0.

* parse.y, re.c: Now mbclen() takes unsigned char as its argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-04 14:43:08 +00:00
aamine cf49a01eae * parse.y [ripper]: emit lexer-event values to the parser.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-31 05:22:58 +00:00
matz 3e9e2bd4ed * eval.c (rb_eval): NODE_XSTR should pass copy of literal string.
* array.c (rb_ary_update): a[n,m]=nil no longer works as element
  deletion.

* enum.c (enum_sort_by): protect continuation jump in.
  [ruby-dev:24642]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-30 06:56:18 +00:00