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

2467 Коммитов

Автор SHA1 Сообщение Дата
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
eban d39d90f86a * lib/mkmf.rb (try_func): remove COMMON_HEADERS at first for performance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-12 18:24:55 +00:00
nobu f79b715829 * misc/ruby-mode.el (ruby-forward-sexp): missed argument for forward-word.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-12 12:03:26 +00:00
nobu 6cdf714126 * misc/ruby-mode.el (ruby-beginning-of-arg): substitute
ruby-backward-arg.

* misc/ruby-mode.el (ruby-calculate-indent): fixed wrong
  indentation in brace block and parentheses.

* misc/ruby-mode.el (ruby-forward-sexp, ruby-backward-sexp):
  support special char literal, and negative arguments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-12 11:59:45 +00:00
nobu 6e4a83c0a3 * win32/win32.c (rb_w32_stat): check arguments. [ruby-dev:20007]
[ruby-win32:535]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-11 10:02:37 +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
nobu 76d7e7d54c * numeric.c (coerce_rescue): prevent inspected String from GC.
* numeric.c (flo_eq, rb_dbl_cmp, flo_gt, flo_ge, flo_lt, flo_le,
  flo_eql): correct NaN comparison.  (ruby-bugs:PR#744)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-11 06:37:48 +00:00
matz a700bcfafa * file.c (rb_stat): dereference using StringValuePtr().
* file.c (rb_file_s_stat): use rb_stat(). [ruby-dev:20007]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-11 05:49:34 +00:00
eban 1fab5e27c3 2003-04-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-11 03:21:08 +00:00
nobu 4347eb8a7f * lib/benchmark.rb (Benchmark::bm): get rid of warning.
[ruby-talk:69124]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-11 01:51:14 +00:00
nobu 0b984f51a1 * io.c (set_stdin): assigned value must respond to "read" and
"getc".

* io.c (set_outfile): assigned value must respond to "write".
  (ruby-bugs-ja:PR#425)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-10 17:41:40 +00:00
aamine 95eb316d44 * lib/net/pop.rb: Exception line was accidentaly removed. [ruby-dev:19989]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-10 12:15:33 +00:00
tadf 59dc82ae1a added some checks for request size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-10 09:48:15 +00:00
matz e74149056b * variable.c (rb_mod_name): always return empty string for
anonymous class/module.  (ruby-bugs-ja PR#424)

* config.sub: stop forcing addition of -gnu to -linux.

* variable.c (classname): refactoring.

* variable.c (rb_class_path): __tmp__classpath__ handling moved
  from classname().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-10 08:37:12 +00:00
matz dc08e8a60f * variable.c (rb_mod_name): search module path if classname is not
set yet. (ruby-bugs-ja PR#424)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 18:33:52 +00:00
nobu ae6b9ced18 * eval.c (rb_obj_is_method): indefinite return value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 16:52:28 +00:00
eban 769610b6f0 2003-04-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 15:56:13 +00:00
akr 66ca3af2ba * regex.c (re_compile_pattern): /[\--\-]/ was warned. warn /]/.
* mkconfig.rb: escape `]' in regexp.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 15:45:28 +00:00
nobu 2e10fa962f * time.c (time_strftime): RSTRING(format)->ptr might become NULL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 15:27:39 +00:00
matz 8e09f5b907 * variable.c (rb_obj_remove_instance_variable): better message.
[ruby-talk:68987]

* variable.c (rb_mod_remove_const): ditto.

* object.c (rb_obj_ivar_get): ditto.

* object.c (rb_obj_ivar_set): ditto.

* parse.y (yylex): ditto.

* eval.c (rb_mod_define_method): Allow UnboundMethod as
  parameter.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 15:06:57 +00:00
matz e5877f1c96 * gc.c (rb_gc_mark_children): introduce this function again; this
is required when stack was very tight. [ruby-talk:68916]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 08:27:01 +00:00
eban fcb42a16dc 2003-04-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 06:54:36 +00:00
matz 22af5fa881 * bignum.c (bigdivmod): small typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 06:49:51 +00:00
matz 5cb4133e67 * bignum.c (BIGZEROP): macro to determine if x is a bignum zero.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 06:44:34 +00:00
usa bb4ade0ab6 * ext/readline/readline.c: include <unistd.h> only when
HAVE_UNISTD_H is defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 06:39:02 +00:00
nobu db24e481b3 * marshal.c (w_object): preserve extended module on struct.
(ruby-bugs-ja:PR#422)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-09 05:08:25 +00:00
matz f92f8b565f * random.c (rb_f_rand): normalize bignum argument.
* sprintf.c (rb_f_sprintf): was decrementing width even if there
  is no sign character.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-08 09:02:04 +00:00
eban 5c9d3fac30 2003-04-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-08 05:47:46 +00:00
matz ed0b577108 * eval.c (Init_Proc): make Method and UnboundMethod independent.
They are like instance and its class. [ruby-core:00941]

* parse.y (yylex): disallow global variables like "$1ve".
  [ruby-core:00945]

* marshal.c (marshal_dump): Marshal.dump(0, false) should cause an
  error. (ruby-bugs-ja PR#421)

* regex.c (re_compile_pattern): warn if '-' is the edge of
  character range.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-08 05:40:29 +00:00
eban 6acc44d2e4 2003-04-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-07 07:20:10 +00:00
matz e11f6de3c5 * ext/socket/socket.c (sock_s_unpack_sockaddr_in): remove struct
size check.  getnameinfo(3) can handle. [ruby-dev:19967]

* io.c (io_read): do not call rb_sys_fail() when required data
  length is zero. (ruby-bugs-ja PR#420)

* eval.c (umethod_proc): should raise TypeError, instead of
  returning error causing Proc.  Following the principle of "fail
  early".  [ruby-core:00927]

* pack.c (pack_pack): small but serious typo.

* eval.c (backtrace): skip internal allocator frame.
  (ruby-bugs-ja PR#416)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-07 06:58:31 +00:00
katsu e393f0ad16 * zlib.c (rb_gzreader_getc): the return value of GzipReader#getc must be unsigned.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-06 09:29:21 +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
eban 267b39cfb4 2003-04-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-04 11:45:49 +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
eban 75c2f3cbc5 2003-04-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-03 13:24:02 +00:00
matz c94187bce0 * eval.c (rb_f_missing): use "inspect" for T_OBJECT as well.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-03 05:25:00 +00:00
nobu 153f513f49 * README.EXT, README.EXT.ja (3.3): clarified -1 as free for
Data_Wrap_Struct().  [ruby-dev:19881]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-02 06:11:28 +00:00
eban 8d3e57221a 2003-03-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-31 03:59:26 +00:00
matz d093279888 * hash.c (env_reject_bang): untaint key string.
* hash.c (env_delete_m): execute block only if deleting key does
  not exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-31 02:06:23 +00:00
matz 5bfef93c44 * pack.c (pack_pack): do not call rb_str_buf_cat() with NULL ptr,
which causes SEGV; jump to grow instead. [ruby-dev:19944]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-29 11:17:55 +00:00
eban 7c9b9e39bd 2003-03-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-29 08:22:44 +00:00
akr 0977fe1705 * instruby.rb, ext/extmk.rb, lib/benchmark.rb, lib/cgi.rb,
lib/debug.rb, lib/getoptlong.rb, lib/optparse.rb, lib/time.rb,
  lib/date/format.rb, lib/irb/ruby-lex.rb lib/uri/common.rb: revert
  escape for `-' in character class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-29 06:39:50 +00:00
matz fec60bc7c4 * eval.c (avalue_to_svalue): use rb_check_array_type() again.
Clarify how "to_ary" and "to_a" work. [ruby-talk:68155]

* eval.c (svalue_to_avalue): ditto.

* eval.c (svalue_to_mrhs): ditto.

* eval.c (rb_eval): unary splat to use to_a, but we need a hack to
  exclude Object#to_a until it's removed.

* object.c (rb_Array): check obj.respond_to?("to_a").  Currently
  all object respond_to "to_a", but Object#to_a will be removed.

* range.c (Init_Range): undefine to_ary.

* re.c (Init_Regexp): ditto.

* regex.c (re_compile_pattern): do not warn if "-" is at the top
  or last of character class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-29 02:56:18 +00:00
nobu 95785964f6 * MANIFEST (ext/aix_mksym.rb): remove obsolete file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-29 00:50:32 +00:00
katsu 6f19027e40 Import Ruby/zlib from rough.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-28 17:21:24 +00:00
nobu 8a18a837f3 2003-03-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-28 10:33:58 +00:00
nobu 2cefaf671a * variable.c (rb_class_path): hold temporary class path in a
instance variable to get rid of GC.  [ruby-dev:19932]

* variable.c (classname): remove temporary class path when exact
  name found.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-28 10:33:43 +00:00
shigek 15e11a88c6 Use rb_str2cstr() instead of STR2CSTR() macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-28 07:50:28 +00:00
shigek 640c19405c Rubbish !
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-28 05:15:59 +00:00