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

264 Коммитов

Автор SHA1 Сообщение Дата
tadf fd2f7ab576 use warn() instead of $stderr.puts().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-18 23:13:15 +00:00
matz 25fd1d7ff2 * object.c (rb_class_allocate_instance): singleton class check
moved to rb_obj_alloc(). (ruby-bugs-ja PR#345)

* re.c (rb_reg_quote): should escape white space characters,
  \t, \f, \n, \r. (ruby-bugs-ja PR#231)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-16 23:28:31 +00:00
tadf 6154ce97a7 use values_at instead of select.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-05 14:02:14 +00:00
eban b65e3629da * sample/test.rb: substitute 'select' with 'values_at'.
* lib/date.rb: ditto.
* lib/parsedate.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-05 10:05:11 +00:00
eban 472672dfe6 * sample/test.rb: avoid the MSVCRT *printf problem(float).
[ruby-dev:20037]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-20 15:52:56 +00:00
matz 6987b0806e * struct.c (rb_struct_eql): should compare values with "eql?".
* range.c (range_check): <=> returns nil for invalid values;
  should check.

* regex.c (re_compile_pattern): should not set RE_OPTIMIZE_ANCHOR,
  if anychar_repeat is enclosed by parentheses.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-18 18:05:11 +00:00
nobu 3f4472433d * bignum.c (rb_cstr_to_inum, rb_big2str): allow 2-36 as radix.
* numeric.c (rb_fix2str): ditto.

* string.c (rb_str_to_i): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-14 06:54:27 +00:00
nobu fd0fdbe908 * sample/test.rb: NaN comparison test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-11 06:56:13 +00:00
akr add23cc22e * sample/exyacc.rb: use Regexp in gsub!.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-05 15:38:16 +00:00
matz 79557dcbb0 * eval.c (assign): should prepare mrhs by svalue_to_mrhs().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-04 05:12:19 +00:00
matz e9b5878c41 * eval.c (avalue_splat): new function to do unary * (splat)
operator.

* eval.c (avalue_to_svalue,svalue_to_avalue,svalue_to_mrhs): do
  not use implicit "to_ary" conversion.

* ext/curses/curses.c (GetWINDOW,GetMOUSE): add taint check.

* ext/curses/curses.c (curses_init_screen): ditto.

* ext/curses/curses.c (window_initialize): ditto.

* gc.c (os_each_obj): prohibit ObjectSpace#each_object in safe
  mode ($SAFE >= 4).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-26 07:01:14 +00:00
matz 80a97f173f * signal.c (trap): return "DEFAULT" and "IGNORE" respectively for
previous sighandler SIG_DFL and SIG_IGN. [ruby-talk:67860]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-25 15:25:18 +00:00
matz 2abf664151 * eval.c (massign): remove unnecessary array unpacking; it should
be handled before massign() by svalue_to_mrhs().

* eval.c (svalue_to_mrhs): '*a = v' value conversion to avalue
  (i.e. [1] => [[1]], [1,2] => [1,2]).

* eval.c (rb_eval): use svalue_to_mrhs.

* eval.c (rb_yield_0): ditto.

* eval.c (proc_invoke): break from "Proc#yield" is legal.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-10 23:03:06 +00:00
matz 6a6d0ad220 * parse.y (arg): parse 'lhs = a rescue b' as 'lhs=(a rescue b)'.
* io.c (rb_io_fread): should not clearerr() if there's no filled
  buffer (i.e. rb_io_fread() returning zero).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-03 05:17:39 +00:00
nobu d0d70d648d * file.c (file_expand_path): buffer might be reallocated while
expanding default directory.

* file.c (file_expand_path): default directory was being
  ignored if path was full path with no drive letter, under
  DOSISH.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-16 10:22:36 +00:00
nobu f2d07eb82d * file.c (file_expand_path): fix surplus path separators while
expanding at root directory.  [ruby-dev:19572]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-14 16:09:07 +00:00
nobu 246800d42b *** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-13 09:58:57 +00:00
matz 937092b820 * range.c (range_step): step might be float 0 < x < 1.
* eval.c (rb_thread_schedule): pause if no runnable thread when
  there's only one thread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-13 09:11:11 +00:00
matz 1d5e19f624 * array.c (rb_ary_equal): a == b is true when b is non T_ARRAY
object, if b has "to_ary" and b == a.

* hash.c (rb_hash_equal): a == b is true when b is non T_HASH
  object, if b has "to_hash" and b == a.

* string.c (rb_str_equal): a == b is true when b is non T_STRING
  object, if b has "to_str" and b == a.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-04 07:27:43 +00:00
matz 0c90036fd1 * re.c (rb_memsearch): algolithm body of String#index.
* error.c (Init_Exception): "to_str" removed.

* eval.c (eval): should not rely on Exception#to_str

* eval.c (compile_error): ditto.

* error.c (err_append): ditto.

* hash.c (rb_hash_merge): Hash#merge, non destructive "update".
  now there's also Hash#merge! which is an alias to "update".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-03 05:34:16 +00:00
matz d242ae60d8 * regex.c (is_in_list): should work weill with UTF-8.
* regex.c (re_match_exec): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-20 08:29:24 +00:00
matz 6d481a4ae4 * hash.c (env_clear): new Hash compatible method.
* hash.c (env_shift): ditto.

* hash.c (env_invert): ditto.

* hash.c (env_replace): ditto.

* hash.c (env_update): ditto.

* array.c (rb_ary_join): dispatch based on "to_str".

* array.c (rb_ary_times): ditto.

* array.c (rb_ary_equal): ditto.

* process.c (rb_f_exec): dispatch based on "to_ary".

* eval.c (umethod_bind): exact class match is not required.  relax
  the restriction to subclasses.

* eval.c (rb_eval): call "inherited" before executing class body.

* class.c (rb_define_class): call "inherited" after defining the
  constant.

* class.c (rb_define_class_under): ditto.

* eval.c (massign): expand first element if RHS is an array and
  its size is 1, and LHS has concrete assignment target (i.e. LHS
  has target(s) other than *var).

* eval.c (massign): avoid unnecessary avalue/svalue conversion.

* eval.c (rb_yield_0): ditto

* array.c (rb_ary_update): do not allocate unused array if rpl is
  nil (i.e. merely removing elements).

* io.c (io_read): should resize supplied string if it's shorter
  than expected.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-07 07:36:40 +00:00
matz 0082edfd3d * eval.c (massign): removed awkward conversion between yvalue,
mvalue, etc.

* eval.c (rb_yield_0): new parameter added to tell whether val is
  an array value or not.

* parse.y (yield_args): restructuring: new nodes: NODE_RESTARY2,
  NODE_SVALUE; removed node: NODE_RESTARGS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-01 03:24:29 +00:00
knu 02a8d06fa8 Improve.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 20:56:37 +00:00
knu c37140b351 Be consistent on the use of the implicit $_.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 20:45:24 +00:00
knu 63406c4971 Improve.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 20:42:50 +00:00
knu 354af9da36 Fix a bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 20:39:26 +00:00
knu 913bc18761 The use of $_ and ~/RE/ is discouraged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 20:30:05 +00:00
knu d46e835344 Strive to give better examples.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-12-19 20:26:16 +00:00
knu c04ef9321c * bin/irb: Moved from sample/irb.rb.
* instruby.rb: Install script files under bin/ with ruby's program
  prefix and suffix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-11-18 16:57:36 +00:00
nobu 8815306dc5 ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02 15:37:07 +00:00
eban 52ecaae5b6 * sample/mkproto.rb: ditto and fix bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-26 07:47:50 +00:00
matz be1d2c5f68 * string.c (rb_str_slice_bang): if there's no corresponding
substring, slice! should return nil without exception.

* array.c (rb_ary_insert): type fixed.

* string.c (rb_str_split_m): accept separator value nil as well.

* string.c (rb_str_become): was leaking memory.

* class.c (rb_include_module): should not alter other
  classes/modules by inclusion.  by this fix, local order may not
  be preserved for some cases.

* class.c (include_class_new): module may be T_ICLASS; retrieve
  original module information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-07-11 08:22:18 +00:00
matz f0221db462 * re.c (rb_reg_expr_str): need to process backslashes properly.
* object.c (rb_any_to_a): declare Object#to_a to be obsolete.

* object.c (rb_Array): do not convert nil into [] automagically.

* object.c (rb_Integer): use "to_int" instead of
  "to_i". [experimental]

* object.c (nil_to_f): new method.

* object.c (rb_Integer): Symbols and nil should cause error.

* object.c (rb_Float): nil should cause error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-28 14:42:46 +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
tadf 0e866a2e51 updated to the new version (based on date2 3.3).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-22 15:26:58 +00:00
matz 8a6092725d ext/exmk.rb.in, lib/singleton.rb: remove nested ""s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-13 04:53:39 +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
H_Konishi 96654ce041 * sample/biorhythm.rb (getPosiiton,etc)
fix at changing Date module ( Date is changed Fixnum to Rational )


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-06 11:14:04 +00:00
tadf dc9cd6a8c2 updated to the new version (based on date2 3.2.1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-18 12:41:51 +00:00
eban 7ee0812aee * sampl/test.rb: use eval instead of './miniruby -c',
in order to check a syntax error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-17 07:29:47 +00:00
matz eb6118992b * eval.c (rb_clear_cache_by_class): new function.
* eval.c (set_method_visibility): should have clear cache forq
  updated visibility.

* numeric.c (flo_to_s): default format precision to be "%.16g".

* util.c (ruby_strtod): use own strtod(3) implementation to avoid
  locale hell.  Due to this change "0xff".to_f no longer returns 255.0

* eval.c (avalue_to_yvalue): new function to distinguish yvalue
  (no-arg == Qundef) from svalue (no-arg == Qnil).

* eval.c (rb_yield_0): use avalue_to_yvalue().

* eval.c (assign): warn if val == Qundef where it means rhs is
  void (e.g. yield without value or call without argument).

* parse.y (value_expr): need not to warn for WHILE and UNTIL,
  since they can have return value (via valued break).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-05-14 06:22:31 +00:00
matz 6d2e56ce7c * re.c (rb_reg_search): should clear last_match if pos is out of
string range.

* string.c (rb_str_index_m): ditto.

* string.c (rb_str_rindex): ditto.

* class.c (rb_define_class): should handle autoload.

* class.c (rb_define_module): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-19 09:03:11 +00:00
matz 43b18e733d * regex.c (re_compile_pattern): '\0111' should be '\011' plus '1',
since octal literals are formed by three digits at most.

* marshal.c (w_object): module inclusion using extend() should
  also be detected.

* eval.c (rb_eval_cmd): cbase should not be NULL; it should be
  either ruby_wrapper or Object.

* enum.c (enum_each_with_index): should return self.

* process.c (proc_setpgrp): should return value for non-void function.

* process.c (proc_getpgid): should raise exception if getpgid() return -1.

* string.c (rb_str_ljust): should return a duplicated string.

* string.c (rb_str_rjust): ditto.

* string.c (rb_str_center): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-12 09:28:50 +00:00
matz d497898c23 * eval.c (cvar_cbase): utility function to find innermost non
singleton cbase.

* eval.c (is_defined): adopt new cvar behavior.

* eval.c (rb_eval): ditto.

* eval.c (assign): ditto.

* class.c (rb_mod_clone): should not call rb_obj_clone(), since
  Module does not provide "allocate".

* class.c (rb_singleton_class): should crate new singleton class
  if obj is a class or module and attached object is different,
  which means metaclass of singleton class is sought.

* time.c (time_s_alloc): now follows allocation framework.

* eval.c (rb_eval): should initialize outer class variables from
  methods in singleton class definitions.

* eval.c (assign): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-08 07:03:09 +00:00
nobu 959a99078e commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-25 10:46:48 +00:00
nobu 0778120490 * sample/test.rb (system): test with scripts under the source
directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-25 10:43:13 +00:00
matz 9eae31d569 * file.c (path_check_1): do not warn on world writable *parent*
directories.

* class.c (rb_include_module): should preserve ancestor order in
  the included class/module.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-19 07:47:07 +00:00
matz d1ca5e6d6a * eval.c (rb_eval_string_wrap): should hide the toplevel local
variable bindings by PUSH_SCOPE().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-19 04:49:27 +00:00
matz 289430e8ec * bignum.c (rb_big_rshift): should properly convert the nagative
value to 2's compliment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-15 04:43:58 +00:00
matz ba8fc117c5 * parse.y (stmt): local variable declaration order was changed
since 1.6

* parse.y (arg): ditto.

* pack.c (pack_pack): add templates 'q' and 'Q'.

* pack.c (pack_unpack): ditto.

* bignum.c (rb_quad_pack): new utility function.

* bignum.c (rb_quad_unpack): ditto.

* parse.y (assignable): should emit CVASGN within the method
  body.

* dir.c (dir_s_glob): should not warn even if no match found.

* eval.c (rb_eval): clean up class variable behavior.

* eval.c (assign): ditto.

* eval.c (is_defined): ditto.

* variable.c (rb_mod_class_variables): need not to call rb_cvar_singleton().

* variable.c (rb_cvar_singleton): removed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-13 09:01:11 +00:00
matz c0a636b6f9 * st.c: primes should be primes.
* eval.c (is_defined): method defined? check should honor
  protected too.

* eval.c (block_pass): should not pass tainted block, if $SAFE > 0.

* variable.c (rb_mod_remove_cvar): should pass the char*.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-16 09:25:59 +00:00
eban b487727ea4 * sample/test.rb: Hash#indexes -> Hash#select.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-18 08:56:51 +00:00
matz 2f8d3bdc21 * array.c (rb_ary_modify): should copy the internal buffer if the
modifying buffer is shared.

* array.c (ary_make_shared): make an internal buffer of an array
  to be shared.

* array.c (rb_ary_shift): avoid sliding an internal buffer by
  using shared buffer.

* array.c (rb_ary_subseq): avoid copying the buffer.

* parse.y (gettable): should freeze __LINE__ string.

* io.c (rb_io_puts): old behavoir restored.  rationale: a) if you
  want to call to_s for arrays, you can just call print a, "\n".
  b) to_s wastes memory if array (and sum of its contents) is
  huge.  c) now any object that has to_ary is treated as an array,
  using rb_check_convert_type().

* hash.c (rb_hash_initialize): now accepts a block to calculate
  the default value. [new]

* hash.c (rb_hash_aref): call "default" method to get the value
  corrensponding to the non existing key.

* hash.c (rb_hash_default): get the default value based on the
  block given to 'new'.  Now it takes an optinal "key" argument.
  "default" became the method to get the value for non existing
  key.  Users may override "default" method to change the hash
  behavior.

* hash.c (rb_hash_set_default): clear the flag if a block is given
  to 'new'

* object.c (Init_Object): undef Data.allocate, left Data.new.

* ext/curses/curses.c (window_scrollok): use RTEST().

* ext/curses/curses.c (window_idlok): ditto.

* ext/curses/curses.c (window_keypad): ditto.

* ext/curses/curses.c (window_idlok): idlok() may return void on
  some platforms; so don't use return value.

* ext/curses/curses.c (window_scrollok): ditto for consistency.

* ext/curses/curses.c: replace FIX2INT() by typechecking NUM2INT().

* parse.y (str_extend): should not process immature #$x and
  #@x interpolation, e.g #@#@ etc.

* enum.c (enum_sort_by): sort_by does not have to be stable always.

* enum.c (enum_sort_by): call qsort directly to gain performance.

* util.c (ruby_qsort): ruby_qsort(qs6) is now native thread safe.

* error.c (rb_sys_fail): it must be a bug if it's called when
  errno == 0.

* regex.c (WC2MBC1ST): should not pass through > 0x80 number in UTF-8.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-10 07:18:16 +00:00
matz 24b3a3e748 * parse.y (str_extend): should not terminate string interpolation
with newlines in here-docs and newline terminated strings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-19 16:20:24 +00:00
matz 948ff2456b * signal.c (sighandle): should not re-register sighandler if
POSIX_SIGNAL is defined.

* eval.c (error_print): errat array may be empty.

* eval.c (rb_eval_cmd): should not upgrade safe level unless
  explicitly specified by argument newly added.

* signal.c (sig_trap): should not allow tainted trap closure.

* variable.c (rb_f_trace_var): should not allow trace_var on safe
  level higher than 3.

* variable.c (rb_f_trace_var): should not allow tainted trace
  closure.

* gc.c: do not use static stack until system stack overflows.

* eval.c (eval): should call Exception#exception instead of
  calling rb_exc_new3() directly.

* error.c (exc_exception): set "mesg" directly to the clone.  it
  might be better to set mesg via some method for flexibility.

* variable.c (cvar_override_check): should print original module
  name, if 'a' is T_ICLASS.

* parse.y (yylex): float '1_.0' should not be allowed.

* variable.c (var_getter): should care about var as Qfalse
  (ruby-bugs#PR199).

* array.c (cmpint): <=> or block for {min,max} may return bignum.

* array.c (sort_1): use rb_compint.

* array.c (sort_2): ditto.

* enum.c (min_ii): ditto.

* enum.c (min_ii): ditto.

* enum.c (max_i): ditto.

* enum.c (max_ii): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-13 08:14:27 +00:00
matz dc98adf839 * process.c (security): always give warning for insecure PATH.
* dir.c (my_getcwd): do not rely on MAXPATHLEN.

* file.c (rb_file_s_readlink): ditto.

* file.c (path_check_1): ditto.

* eval.c (rb_yield_0): should not call rb_f_block_given_p().

* string.c (rb_str_chomp_bang): should terminate string by NUL.

* eval.c (rb_yield_0): better error message.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-11-08 06:43:14 +00:00
matz 959d5febcf * class.c (rb_mod_clone): should not copy class name, since clone
should remain anonymous.

* eval.c (rb_call0): self in a block given to define_method now be
  switched to the receiver of the method.

* eval.c (proc_invoke): added new parameter to allow self
  switching.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-10-22 06:48:18 +00:00
matz 0869399cbf * eval.c (svalue_to_avalue): new conversion scheme between single
value and array values.

* eval.c (avalue_to_svalue): ditto.

* eval.c (rb_eval): REXPAND now uses avalue_to_svalue(), return
  and yield too.

* eval.c (rb_yield_0): use avalue_to_svalue().

* eval.c (proc_invoke): Proc#call gives avaules, whereas
  Proc#yield gives mvalues.

* eval.c (bmcall): convert given value (svalue) to avalue.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-23 15:14:28 +00:00
matz def42c9a0c * eval.c (rb_yield_0): no mvalue_to_svalue conversion here.
* eval.c (massign): takes svalue, convert it to mvalue inside.

* eval.c (rb_eval): parameters for yield/return are always
  svalues now.

* eval.c (svalue_to_mvalue): more strict conversion.

* eval.c (mvalue_to_svalue): ditto.

* st.c (new_size): prime hash size enabled.

* ext/socket/socket.c (Init_socket): SO_* constants added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-22 09:12:24 +00:00
matz 058888bd38 * eval.c (svalue_to_mvalue): new function to convert from svalue
to mvalue. [experimental]

* eval.c (mvalue_to_svalue): new function to convert from mvalue
  to svalue.

* eval.c (rb_eval): use mvalue_to_svalue().

* eval.c (rb_yield_0): use mvalue_to_svalue().

* eval.c (proc_invoke): proper mvalue handling.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-19 07:33:10 +00:00
matz 46e8ae1104 * gc.c (Init_stack): avoid __builtin_frame_address(2) to retrieve
stack bottom line.

* st.c (numhash): should shuffle bits by dividing by prime number.

* eval.c (rb_eval): multiple assignment behavior fixed, which
  results "*a = nil" makes "a == []" now.

* eval.c (rb_f_require): should set SCOPE_PUBLIC before calling
  dln_load().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-06-08 14:20:58 +00:00
knu a5d64434dd Synchronize MANIFEST with reality. Add missing files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-26 03:38:39 +00:00
knu dbe06b680b Obsoleted by IRB.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-05-07 18:46:39 +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
knu 859a7a9277 Merge from irb 0.7.3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-04-30 17:54:55 +00:00
matz 08ec02b92b changes from personal modifies -- matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-12-28 05:00:47 +00:00
matz f54418b71f matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-27 09:23:38 +00:00
matz 074203d270 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-16 07:24:21 +00:00
matz d1bcd482a7 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-01 08:49:40 +00:00
matz c90b1ecaf8 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-10-31 08:37:47 +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
matz 6f36fedaa4 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-27 09:11:13 +00:00
matz f1bb1f5848 000919
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-19 07:54:28 +00:00
matz bbf2ad4ed8 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-09-15 06:00:30 +00:00
matz ed474caef1 matz - biorhythm.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-31 09:21:25 +00:00
matz 993204f632 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-25 07:21:54 +00:00
matz 741ca76912 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-18 06:00:45 +00:00
matz ce175376b2 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-14 04:34:43 +00:00
matz c67a74570d matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-10 04:49:24 +00:00
matz d1375688cd matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-06 07:21:26 +00:00
matz 4f51d81418 matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-07-04 04:17:26 +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 9a1716fdb2 2000-05-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-30 04:24:17 +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 133ff3421a 2000-05-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-17 04:38:19 +00:00
matz a5b607c895 remove configure from repositry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-16 02:46:57 +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 014f2164ed 2000-05-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-10 02:58:41 +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 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 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 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 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
matz e4b53b2222 2000-02-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-02-01 03:12:21 +00:00
matz e5ed1780af 2000-01-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-01-18 06:09:05 +00:00
matz de71615260 20000105
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-01-05 04:41:21 +00:00
matz a3f29338ad 19991201
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-12-01 09:24:48 +00:00
matz 40517ecac8 19991129
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-11-29 06:33:02 +00:00
matz 8e48dc16e9 19991117
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-11-17 07:30:37 +00:00
matz 3196645aee -r debug, -s, etc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-10-15 08:52:18 +00:00
matz be1fea072c 19991012
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-10-12 04:53:36 +00:00
matz 7152df6b9b 990918-repack
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-09-18 04:48:51 +00:00
matz 9e3d9a2a00 1.4.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-09-16 09:40:33 +00:00
matz 942b2ba4b6 remove obsolete files
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-08-13 06:09:54 +00:00
matz 65a5162550 1.4.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-08-13 05:45:20 +00:00
matz 210367ec88 This commit was generated by cvs2svn to compensate for changes in r372,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-01-20 04:59:39 +00:00
matz 9c5b1986a3 Initial revision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-01-20 04:59:32 +00:00
matz 7ea2ceddb8 This commit was generated by cvs2svn to compensate for changes in r11,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1998-01-16 12:19:22 +00:00
matz 62e41d3f2e Initial revision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1998-01-16 12:19:09 +00:00
matz 3db12e8b23 Initial revision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1998-01-16 12:13:05 +00:00