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

349 Коммитов

Автор SHA1 Сообщение Дата
matz ed18815109 * eval.c (rb_mod_public_method_defined, etc.): new methods:
public_method_defined?, private_method_defined?,
  protected_method_defined?

* object.c (rb_obj_public_methods): new method
  Object#public_methods.

* class.c (ins_methods_i): Object#methods should list both public
  and protected methods.

* class.c (rb_class_public_instance_methods): new method
  Module#public_instance_methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-30 08:04:32 +00:00
knu a2868ff651 * eval.c, file.c, gc.c, io.c, object.c, ruby.c, ruby.h, struct.c,
ext/socket/socket.c: differentiate long and int; use proper
  printf type specifiers and do casts where appropriate.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-29 21:35:28 +00:00
nobu 088276ac84 * eval.c (error_print, rb_longjmp, rb_thread_schedule): flush
error message.  [ruby-dev:18582]

	* eval.c (ruby_cleanup): added.  just clean up without exit.
	  [ruby-dev:18582]

	* eval.c (ruby_exec): added.  execute main evaluation tree without
	  exit.  [ruby-dev:18582]

	* intern.h: prototypes; ruby_cleanup, ruby_exec


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-29 19:11:17 +00:00
knu 3da9449263 * eval.c, gc.c: adopt a common set of alloca() #ifdef's. This
fixes the build with Intel C Compiler for Linux.

* eval.c (rb_f_require): declare old_func with a real type, not
  just type modifiers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-25 18:39:30 +00:00
nobu d4f2f6a7f7 * eval.c (rb_eval): added NODE_DSYM, symbol literal with
interpolation.

* node.h: ditto.

* intern.h: prototypes; rb_is_junk_id, rb_str_dump, rb_str_intern

* object.c (sym_inspect): escape and quote for non-alphanumeric
  symbols.

* parse.y (dsym, tokadd_string, yylex): extended symbol literals.

* parse.y (rb_is_junk_id): added.

* string.c (rb_str_dump, rb_str_intern) : make extern.

* lib/mkmf.rb (create_makefile): deffile should be removed by
  distclean, not clean.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-23 10:17:30 +00:00
knu 6dfb5aa6ac * hash.c, eval.c: Use (*_NSGetEnviron()) instead of environ on
Darwin for namespace cleanness.  [ruby-core:00537]

* dln.c (dln_load): Fix Darwin support that has been disabled and
  switch to using it on Darwin instead of the system dlopen().
  [ruby-core:00541]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-17 16:13:44 +00:00
aamine 0944a05fb9 * eval.c (rb_load): should not pass block to the loaded file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-05 15:46:24 +00:00
nobu 1e3062ede1 * eval.c (rb_thread_interrupt, rb_thread_signal_raise): no need to
save dead thread context. (same as [ruby-dev:18322])
  (ruby-bugs-ja:PR#349)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-04 11:32:16 +00:00
nobu 4b6dffad02 * bcc32/mkexports.rb: to work on cygwin via telnet.
[ruby-win32:358]

* ext/tcltklib/tcltklib.c (ip_invoke): requires command name
  argument.  [ruby-dev:18438]

* eval.c (ruby_init, ruby_options): Init_stack() with local
  location.  (ruby-bugs-ja:PR#277)

* eval.c (rb_call0): disable trace call.  [ruby-dev:18074]

* eval.c (eval, rb_load): enable trace call.  [ruby-dev:18074]

* eval.c (rb_f_require): set source file name for extension
  libraries.  [ruby-dev:18445]

* ruby.c (translate_char): translate a character in a string;
  DOSISH only.  [ruby-dev:18274]

* ruby.c (ruby_init_loadpath): added argv[0] handling under
  Human68K.  [ruby-dev:18274]

* ruby.c (proc_options): translate directory separator in $0 to
  '/'.  [ruby-dev:18274]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-03 11:20:31 +00:00
nobu cfeb0c30c4 * eval.c (rb_thread_deadlock, rb_thread_schedule, rb_thread_join): more verbose message at deadlock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-27 09:42:24 +00:00
matz af181db784 * eval.c (rb_eval): Class#inherited should be called after the
execution of the class body.

* parse.y (primary): remove "return outside of method" check at
  compile time.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-27 04:26:21 +00:00
matz 7c4d1fe5e0 * regex.c (re_match): p1 may exceed pend limit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26 00:48:33 +00:00
matz 4b9a7eac05 * io.c (appendline): forget to terminate with nul.
* eval.c (ruby_run): should set toplevel visibility again here.

* eval.c (rb_eval): should not rely on ruby_class == rb_cObject
  check.   Besides allow implicit publicity for attribute set
  methods.

* parse.y (primary): need not to check class_nest, just set
  whether method is an attrset or not.

* string.c (rb_str_each_line): p might be at the top of the
  string.

* class.c (rb_make_metaclass): class of metaclass should be
  metaclass of superclass, unless class itself is a metaclass;
  class of metaclass of metaclass should point back to self.
  eh, confusing, isn't it.

* class.c (rb_singleton_class): check if its class is singleton
  AND attached to self.

* eval.c (rb_eval): should define class/module under ruby_cbase.

* eval.c (rb_eval): should set class/module path based on
  ruby_cbase, not ruby_class.

* eval.c (module_setup): use ruby_cbase instead of ruby_class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-25 07:03:05 +00:00
nobu 53178fc7db * eval.c (rb_call0): must not clear ruby_current_node, or
backtrace cannot be genetated.

* intern.h (ruby_yyparse): rather than yyparse().

* parse.y (yylex): nextc() returns -1 at end of input, not 0.

* parse.y (newline_node): reduce deplicated newline node.

* parse.y (literal_concat): get rid of warning.

* parse.y (new_evstr): fixed junk code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-23 15:48:42 +00:00
nobu 742283385f * eval.c (call_trace_func): should not call trace function while
compilation.

* eval.c (rb_call0): also inside c-func.

* parse.y (yycompile): ditto.

* ruby.c (require_libraries): preserve source file/line for each
  require.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-22 12:52:18 +00:00
nobu 5c6ede680b * eval.c (rb_thread_raise): no need to save dead thread context.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-21 13:30:00 +00:00
michal c7e16e94e4 move struct timeval to missing.h
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-17 13:52:45 +00:00
nobu 9d29825355 * eval.c (rb_thread_die): put thread dead state.
* eval.c (rb_thread_atfork): free stack buffer at fork too.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-17 12:07:36 +00:00
matz 73a47246f2 * eval.c (rb_mod_nesting): load wrapping module should appear in
Module#nesting list. (ruby-bugs-ja:PR#328)

* eval.c (rb_thread_remove): free stack buffer on remove.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-17 09:36:05 +00:00
nobu 026e185838 * eval.c (rb_eval): avoid uninitialized global/class variable
warnings at `||='.  [ruby-dev:18278]

* parse.y (stmt, arg): ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-13 09:36:28 +00:00
nobu 368e015170 * eval.c (rb_trap_eval): preserve thread status and so on.
[ruby-talk:40337], [ruby-core:00019]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 15:13:10 +00:00
nobu bfb1775244 * eval.c (proc_to_s): refined format. [ruby-dev:18215]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-11 09:58:02 +00:00
nobu bb34d7163d * eval.c (rb_mod_define_method): initialize orig_func too.
(ruby-bugs-ja:PR#330)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-10 15:44:36 +00:00
nobu 1ec2805c4f * eval.c (rb_eval): overriding false constant with class/module
definition should be error.  (PR#327)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-05 04:15:50 +00:00
matz 40bc4f5ae4 * array.c (rb_ary_become): should not free ptr if it's shared.
* eval.c (rb_alias): prohibit making an alias named "allocate" if
  klass is a metaclass.

* string.c (rb_string_value_ptr): StringValuePtr() should never
  return NULL pointer.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-29 09:08:18 +00:00
michal 0d0ae37e50 Int vs Long cleanup #3 (ruby-core:352)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-28 08:05:23 +00:00
matz c45908e41f * file.c (rb_find_file): $LOAD_PATH must not be empty.
* file.c (rb_find_file_ext): ditto.

* range.c (range_eq): class check should be based on range.class,
  instead of Range to work with Range.dup.

* range.c (range_eql): ditto.

* class.c (rb_mod_dup): need to preserve metaclass and flags.

* object.c (rb_cstr_to_dbl): had a buffer overrun.

* marshal.c (w_class): integrate singleton check into a funciton
  to follow DRY principle.

* marshal.c (w_uclass): should check singleton method.

* object.c (rb_obj_dup): dmark and dfree functions must be match
  for T_DATA type.

* object.c (rb_obj_dup): class of the duped object must be match
  to the class of the original.

* re.c (rb_reg_quote): do not escape \t, \f, \r, \n, for they are
  not regular expression metacharacters.

* time.c (time_s_alloc): use time_free instead of free (null check,
  also serves for type mark).

* time.c (time_s_at): check dfree function too.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-27 08:31:08 +00:00
nobu 941e43aacf * eval.c (call_trace_func): restore source file/line, as trace
function installed in required library with -r option can be
  called while parsing.  (ruby-bugs:PR#372)

* eval.c (module_setup): unused variable.  [ruby-core:00358]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-24 06:32:40 +00:00
nobu de6c650f44 * eval.c (method_call): check receiver is defined.
* eval.c (umethod_call): removed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-23 15:01:13 +00:00
michal ffc13a6525 *.c: Int vs Long cleanup
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-21 15:47:54 +00:00
matz c7c1384e60 * eval.c (rb_thread_cleanup): should not modify the global
variable curr_thread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-21 08:30:09 +00:00
nobu 71a202fc01 particular symbol for win32_exception_list.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-19 03:41:00 +00:00
eban 6d9d1a9bb4 * eval.c (win32_get_exception_list, win32_set_exception_list): Cygwin fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-19 03:18:33 +00:00
nobu 11e7d457d6 * eval.c (rb_thread_save_context, rb_thread_restore_context):
save/restore SEH chain on MS-Windows at thread switch.
  [ruby-win32:273]

* eval.c (win32_get_exception_frame, win32_set_exception_frame):
  added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-19 00:37:16 +00:00
nobu e3f7536501 * eval.c (compile_error): must not clear ruby_sourcefile here.
(ruby-bugs:PR#364).

* eval.c (rb_longjmp): set ruby_sourcefile before making
  backtrace.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-15 22:58:45 +00:00
nobu 92ca6c7773 * eval.c (ruby_current_node) : added to set sourceline on demand.
* eval.c (error_pos, error_print, rb_longjmp, assign): set source
  file/line.

* eval.c (rb_eval): store current node instead of file/line, and
  preserve it at return.

* eval.c (module_setup): ditto.

* eval.c (struct thread): store node instead of file/line.

* eval.c (rb_thread_raise): ditto.

* intern.h (ruby_current_node): added.

* intern.h (ruby_set_current_source): added.

* parse.y (stmt, arg): not fix position of assignment.

* parse.y (node_assign): ditto.

* parse.y (yycompile): clear current node.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-15 11:49:40 +00:00
matz 1f99d95729 * bignum.c (rb_big_cmp): use dbl2big() for Floats, instead of
big2dbl().

* bignum.c (Init_Bignum): rb_big_zero_p() removed.  There may be
  Bignum zero.

* eval.c (rb_call0): new argument added for original method name.
  preserve original method name in frame->orig_func.

* eval.c (is_defined): use frame->orig_func, not last_func.

* eval.c (rb_eval): ditto.

* eval.c (method_call): supply data->oid also to rb_call0().

* object.c (rb_class_allocate_instance): call rb_obj_alloc() when
  called from alias, thus invoke original "allocate".

* eval.c (remove_method): removing allocate from classes should
  cause NameError.

* hash.c (rb_hash_equal): should check default values.

* ext/socket/socket.c (s_recvfrom): update RSTRING len.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-12 07:39:12 +00:00
nobu 91d884b86e * eval.c (rb_eval): set line number from all nodes.
* eval.c (proc_to_s): show source file/line if available.

* marshal.c (r_object): register TYPE_BIGNUM regardless real type.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-11 00:36:38 +00:00
nobu dfa40855bd * eval.c (rb_eval): set constant in cbase scope.
* eval.c (assign): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-03 12:27:33 +00:00
matz 2b98e10419 * eval.c (rb_undef): undef should be done for klass, not ruby_class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-31 05:18:43 +00:00
aamine fd98af4c65 * eval.c (rb_thread_join_m): add parameter type declaration.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-30 00:13:56 +00:00
aamine 62395a335d * eval.c (localjump_error): add parameter type declaration.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-29 23:34:43 +00:00
nobu ce84517f2c * eval.c (rb_eval): no need to convert to string twice.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26 14:12:26 +00:00
matz 7194b66fb2 * random.c: replace with Mersenne Twister RNG.
* eval.c (jump_tag_but_local_jump): preserve retval in
  LocalJumpError exceptions.

* parse.y (command): no more check for "super outside of method".

* eval.c (rb_mod_define_method): should set last_class and
  last_func in the block->frame.

* eval.c (error_handle): should handle TAG_THROW as well.

* parse.y (yylex): new decimal notation '0d4567'.

* parse.y (yylex): new octal notation '0o777'.

* parse.y (string_content): every string_content node should
  return string only.  use NODE_EVSTR to coercing.

* eval.c (rb_eval): NODE_EVSTR support.

* re.c (rb_reg_quote): avoid unnecessary string allocation.

* string.c (get_pat): quote metachracters before compiling a
  string into a regex.

* string.c (rb_str_split_m): special treatment of strings of size
  1, but AWK emulation.  now uses get_pat().

* string.c (rb_str_match_m): quote metacharacters.

* string.c (rb_str_match2): ditto.

* ext/socket/socket.c (sock_addrinfo): make all 3 versions of
  getaddrinfo happy.  [ruby-core:00184]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26 06:12:39 +00:00
nobu 33061b45b4 * eval.c (rb_eval): NODE_EVSTR is no longer used.
* eval.c (eval): not enforce to make assigned variables dynamic.

* parse.y (string): split rules to strings/xstring/regexp to allow
  arbitrary statements inside string interpolation.

* parse.y (here_document): splitted into three phases.

* parse.y (literall_append, literal_concat): added.
  append/concatinate string literals.

* sample/test.rb (valid_syntax): adjust line number for BEGIN.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-24 07:20:42 +00:00
matz b3ecbfaa01 * eval.c (svalue_to_avalue): v may be Qundef. This fix was
suggested by Guy Decoux.

* hash.c (rb_hash_s_create): use rb_hash_aset() instead of calling
  st_insert() directly, to dup&freeze string keys.

* parse.y (yylex): proper error message for "@@0".

* parse.y (yylex): paren to parse_string() must be zero for
  unparenthesized strings.

* parse.y (str_extend): broken string when unterminated "#{".

* enum.c (enum_sort_by): had a bug in 1 element enumeration.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-13 03:55:44 +00:00
matz 22010642b2 * eval.c (rb_eval): ruby_frame->last_func may be null, if it's
called outside of a method.

* parse.y (arg): use INT2NUM, not INT2FIX for tUMINUS.

* parse.y (arg): unnecessary negative tPOW treatment.

* parse.y (tokadd_escape): wrong backslash escapement.

* parse.y (stmt,arg): too much void value check.

* parse.y (stmt,arg): need to check void value on rules which does
  not use node_assign().

* ext/socket/socket.c (ipaddr): need not to taint hostnames.

* range.c (range_include): should be based on "<=>", whereas
  member? still is based on "each".

* range.c (range_min,range_max): redefine methods based on "<=>".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 07:02:23 +00:00
matz b7bc0cae53 * string.c (rb_str_aset): should raise error if an indexing string
is not found in the receiver.

* sprintf.c (rb_f_sprintf): "%d" should convert objects into
  integers using Integer().

* lib/tempfile.rb (Tempfile::size): added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04 07:34:19 +00:00
matz 34f5c4061c * range.c (range_step): iteration done using "+" if elements are
Numeric.  Otherwise using "succ".

* range.c (range_each): iteration done using "succ".  If the
  elements does not respond to "succ", raise TypeError.  As a
  result, all Enumerable methods, e.g. collect, require elements
  to respond to "succ'.

* range.c (range_member): comparison done using "each", if
  elements are non-Numeric or no-"succ" objects.  Otherwise
  compare using "<=>".

* range.c (Init_Range): remove "size" and "length".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-30 06:12:29 +00:00
matz 4ab1577db3 * parse.y: yyparse #defines moved from intern.h
* ruby.c (proc_options): access prefixed "ruby_yydebug".

* applied modifies to pacify some of gcc -Wall warnings.

* parse.y (arg): no more ugly hack for "**", so that "-2**2" to be
  parsed as "(-2)**2", whereas "- 2**2" or "-(2)**2" to be parsed
  as "-(2**2)".

* parse.y (yylex): '-2' to be literal fixnum. [new]

* time.c (time_succ): new method for Range support.

* time.c (time_arg): nil test against v[6] (usec).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-29 05:20:39 +00:00