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

67 Коммитов

Автор SHA1 Сообщение Дата
eban 84eff7b142 * ruby.h (rb_string_value): add volatile to avoid compiler warning.
* string.c (rb_string_value): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-11 06:13:45 +00:00
matz cc043890f8 * bignum.c (bigdivrem): access boundary bug.
* marshal.c (w_object): prohibit dumping out singleton classes.

* object.c (rb_mod_to_s): distinguish singleton classes.

* variable.c (rb_class2name): it's ok to reveal NilClass,
  TrueClass, FalseClass.

* eval.c (rb_yield_0): preserve and restore ruby_cref as well.

* eval.c (is_defined): core dumped during instance_eval for
  special constants.

* eval.c (rb_eval): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-11 05:24:59 +00:00
matz 1d3d27b42d forgot some checkins.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-06 15:06:00 +00:00
matz fd06a2a7fb * eval.c (block_pass): should not downgrade safe level.
* ext/dbm/extconf.rb: allow specifying dbm-type explicitly.

* ext/dbm/extconf.rb: avoid gdbm if possible, because it leaks
  memory, whereas gdbm.so doesn't.  potential incompatibility.

* string.c (rb_str_insert): new method.

* parse.y (yylex): lex_state after RESCUE_MOD should be EXPR_BEG.

* array.c (rb_ary_insert): new method.

* array.c (rb_ary_update): new utility function.

* io.c (set_outfile): should check if closed before assignment.

* eval.c (rb_eval): should preserve value of ruby_errinfo.

* eval.c (rb_thread_schedule): infinite sleep should not cause
  dead lock.

* array.c (rb_ary_flatten_bang): proper recursive detection.

* eval.c (yield_under): need not to prohibit at safe level 4.

* pack.c (pack_pack): p/P packs nil into NULL.

* pack.c (pack_unpack): p/P unpacks NULL into nil.

* pack.c (pack_pack): size check for P template.

* ruby.c (set_arg0): wrong predicate when new $0 value is bigger
  than original space.

* gc.c (id2ref): should use NUM2ULONG()

* object.c (rb_mod_const_get): check whether name is a class
  variable name.

* object.c (rb_mod_const_set): ditto.

* object.c (rb_mod_const_defined): ditto.

* marshal.c (w_float): precision changed to "%.16g"

* eval.c (rb_call0): wrong retry behavior.

* numeric.c (fix_aref): a bug on long>int architecture.

* eval.c (rb_eval_string_wrap): should restore ruby_wrapper.

* regex.c (re_compile_pattern): char class at either edge of range
  should be invalid.

* eval.c (handle_rescue): use === to compare exception match.

* error.c (syserr_eqq): comparison between SytemCallErrors should
  based on their error numbers.

* eval.c (safe_getter): should use INT2NUM().

* bignum.c (rb_big2long): 2**31 cannot fit in 31 bit long.

* regex.c (calculate_must_string): wrong length calculation.

* eval.c (rb_thread_start_0): fixed memory leak.

* parse.y (none): should clear cmdarg_stack too.

* io.c (rb_fopen): use setvbuf() to avoid recursive malloc() on
  some platforms.

* file.c (rb_stat_dev): device functions should honor stat field
  types (except long long such as dev_t).

* eval.c (rb_mod_nesting): should not push nil for nesting array.

* eval.c (rb_mod_s_constants): should not search array by
  rb_mod_const_at() for nil (happens for singleton class).

* class.c (rb_singleton_class_attached): should modify iv_tbl by
  itself, no longer use rb_iv_set() to avoid freeze check error.

* variable.c (rb_const_get): error message "uninitialized constant
  Foo at Bar::Baz" instead of "uninitialized constantBar::Baz::Foo".

* eval.c (rb_mod_included): new hook called from rb_mod_include().

* io.c (opt_i_set): should strdup() inplace_edit string.

* eval.c (exec_under): need to push cref too.

* eval.c (rb_f_missing): raise NameError for "undefined local
  variable or method".

* error.c (Init_Exception): new exception NoMethodError.
  NameError moved under ScriptError again.

* eval.c (rb_f_missing): use NoMethodError instead of NameError.

* file.c (Init_File): should redifine "new" class method.

* eval.c (PUSH_CREF): sharing cref node was problematic.  maintain
  runtime cref list instead.

* eval.c (rb_eval): copy defn node before registering.

* eval.c (rb_load): clear ruby_cref before loading.

* variable.c (rb_const_get): no recursion to show full class path
  for modules.

* eval.c (rb_set_safe_level): should set safe level in curr_thread
  as well.

* eval.c (safe_setter): ditto.

* object.c (rb_obj_is_instance_of): nil belongs to false, not true.

* time.c (make_time_t): proper (I hope) daylight saving time
  handling for both US and Europe.  I HATE DST!

* eval.c (rb_thread_wait_for): non blocked signal interrupt should
  stop the interval.

* eval.c (proc_eq): class check aded.

* eval.c (proc_eq): typo fixed ("return" was ommitted).

* error.c (Init_Exception): move NameError under StandardError.

* class.c (rb_mod_clone): should copy method bodies too.

* bignum.c (bigdivrem): should trim trailing zero bdigits of
  remainder, even if dd == 0.

* file.c (check3rdbyte): safe string check moved here.

* time.c (make_time_t): remove HAVE_TM_ZONE code since it
  sometimes reports wrong time.

* time.c (make_time_t): remove unnecessary range check for
  platforms where negative time_t is available.

* process.c (proc_waitall): should push Process::Status instead of
  Finuxm status.

* process.c (waitall_each): should add all entries in pid_tbl.
  these changes are inspired by Koji Arai.  Thanks.

* process.c (proc_wait): should not iterate if pid_tbl is 0.

* process.c (proc_waitall): ditto.

* numeric.c (flodivmod): a bug in no fmod case.

* process.c (pst_wifsignaled): should apply WIFSIGNALED for status
  (int), not st (VALUE).

* io.c (Init_IO): value of $/ and $\ are no longer restricted to
  strings.  type checks are done on demand.

* class.c (rb_include_module): module inclusion should be check
  taints.

* ruby.h (STR2CSTR): replace to StringType() and StringTypePtr().

* ruby.h (rb_str2cstr): ditto.

* eval.c (rb_load): should not copy topleve local variables.  It
  cause variable/method ambiguity.  Thanks to L. Peter Deutsch.

* class.c (rb_include_module): freeze check at first.

* eval.c (rb_attr): sprintf() and rb_intern() moved into
  conditional body.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-02 04:22:21 +00:00
matz de51a663b4 * eval.c: remove TMP_PROTECT_END to prevent C_ALLOCA crash.
* file.c (rb_file_flock): do not trap EINTR.

* missing/flock.c (flock): returns the value from lockf(2)
  directly.

* eval.c (ev_const_defined): should ignore toplevel cbase (Object).

* eval.c (ev_const_get): ditto.

* ext/md5/md5.h: replace by independent md5 implementation
  contributed by L. Peter Deutsch (thanks).

* ext/md5/md5init.c: adopted to Deutsch's md5 implementation.

* pack.c (pack_unpack): string from P/p should be tainted.

* ext/curses/curses.c: curses on Mac OS X public beta does not
  have _maxx etc.

* marshal.c (w_object): should truncate trailing zero short for
  bignums.

* object.c (sym_intern): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-26 08:57:16 +00:00
eban d08f28d839 * string.c (trnext): support backslash escape in String#tr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-04 09:46:08 +00:00
matz b27393d6ca * string.c (rb_str_delete_bang): delete! should take at least 1
argument.

* ruby.c (load_file): add rb_gc() after loading to avoid
  extraordinary memory growth.

* dir.c (rb_glob_helper): "./foo" should match "foo", not "./foo".

* eval.c (ev_const_get): retrieve Object's constant if no current
  class is available (e.g. defining singleton class for Fixnums).

* eval.c (ev_const_defined): check Object's constant if no current
  class is available (e.g. defining singleton class for Fixnums).

* time.c (time_timeval): negative time interval shoule not be
  allowed.

* eval.c (proc_call): ignore block to `call' always, despite of
  being orphan or not.

* eval.c (rb_yield_0): should check based on rb_block_given_p()
  and rb_f_block_given_p().

* configure.in (frame-address): --enable-frame-address to allow
  __builtin_frame_address() to be used.

* eval.c (stack_length): use __builtin_frame_address() based on
  the macro USE_BUILTIN_FRAME_ADDRESS.

* gc.c (rb_gc): ditto.

* gc.c (Init_stack): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-28 06:30:03 +00:00
matz 86833594ff * string.c (rb_str_substr): "a"[1,2] should return ""; need
rubicon upgrade.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-19 09:15:27 +00:00
matz ed520cf6e9 * parse.y (parse_quotedwords): %w should allow parenthesis escape.
* parse.y (parse_qstring): %q should allow terminator escape.

* re.c (rb_reg_options): new method to give an option values.

* parse.y (cond0): disable special treating of integer literal in
  conditional unless option -e is supplied.  changes current
  behavior.  experimental.

* parse.y (cond0): give warning for string/integer literals and
  dot operators in conditionals unless option -e is supplied.

* re.c (rb_reg_equal): all option flags should be same to be equal.

* error.c (Init_Exception): make Interrupt a subclass of
  SignalException.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-08 09:19:27 +00:00
matz 765255b737 * array.c (rb_ary_sort_bang): returns self, even if its length is
less than 2.

* eval.c (POP_VARS): propagate DVAR_DONT_RECYCLE, if
  SCOPE_DONT_RECYCLE of ruby_scope is set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-02-02 11:38:20 +00:00
matz 2f0faf671d * string.c (str_independent): should not clear str->orig here.
it's too early.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-29 05:10:42 +00:00
matz 971a4d94f0 Mon Jan 15 16:00:07 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* pack.c (pack_unpack): should check associated pointer packed by
	  pack("P").  restriction added.

Sun Jan 14 21:49:28 2001  Koji Arai  <JCA02266@nifty.ne.jp>

	* sprintf.c (rb_f_sprintf): simple typo.  binary base should be 2,
	  not '2'.

	* re.c (rb_reg_s_last_match): should explicitly return nth match.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-15 07:01:00 +00:00
matz a404ead89e * string.c (rb_str_reverse_bang): forgot to call rb_str_modify().
* object.c (rb_obj_taint): check frozen status before modifying
  taint status.

* object.c (rb_obj_untaint): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-01-09 16:55:50 +00:00
matz 8369164408 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-26 08:32:35 +00:00
matz a5dcc4437e matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-26 08:08:50 +00:00
matz 99020d6e50 001225
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-25 06:29:27 +00:00
matz 03581d5826 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-05 09:36:54 +00:00
eban eab2540846 eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-17 05:59:45 +00:00
matz 1ce6f065b5 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-10 07:03:36 +00:00
matz 9a46002fc0 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-02 07:48:42 +00:00
eban d917f9af97 eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-26 09:11:47 +00:00
matz 6fc752bf7d matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-07 06:59:46 +00:00
matz 5c3523de76 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-01 09:18:11 +00:00
matz df9d49d088 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-08-25 08:26:06 +00:00
matz c67251edb4 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-08-07 05:05:04 +00:00
matz 2f7ff9d1b8 matz - irb (PR#46)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-25 06:03:50 +00:00
matz a4fe713cb1 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-24 07:19:34 +00:00
matz 552fb72159 2000-06-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-06-23 07:05:59 +00:00
matz 44cf56d6e7 2000-06-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-06-22 08:29:58 +00:00
matz 8d18d5b3f9 2000-06-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-06-16 07:44:16 +00:00
matz 1199a7d3d6 2000-06-14-2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-06-14 08:08:50 +00:00
matz abc49e493d 2000-06-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-06-14 05:30:29 +00:00
matz ecd1aab526 2000-06-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-06-05 08:46:59 +00:00
matz 8b1de0b1ad 2000-05-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-24 04:34:26 +00:00
matz 9da4f78db4 2000-05-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-12 09:07:57 +00:00
matz 655e96fa59 2000-05-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-09 04:53:16 +00:00
matz fedf48986d 2000-05-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-01 09:42:38 +00:00
matz 7194267b3b 2000-04-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-04-10 05:48:43 +00:00
matz 688169fd83 2000-03-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-03-23 08:37:35 +00:00
matz 5c13dd59db 2000-03-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-03-17 08:58:21 +00:00
matz 0d3f4a92cf 2000-03-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-03-15 05:01:17 +00:00
matz 31c55301e4 2000-03-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-03-13 07:18:45 +00:00
matz 035226e1fe 2000-03-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-03-08 06:25:19 +00:00
matz 4d215cd9d3 2000-03-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-03-07 08:37:59 +00:00
matz 4890f3a684 2000-02-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-02-29 08:05:32 +00:00
matz 7ed66b9e1d 2000-02-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-02-25 03:51:23 +00:00
matz bf70582cf3 2000-02-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-02-23 05:23:12 +00:00
matz 96b40dff45 2000-02-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-02-17 07:11:22 +00:00
matz 320e99d8dd 2000-02-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-02-08 08:54:01 +00:00
matz d7b8616260 2000-02-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-02-02 08:10:32 +00:00