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

12239 Коммитов

Автор SHA1 Сообщение Дата
matz 10f263c10e * numeric.c (bit_coerce): float should not be a valid operand of
bitwise operations.  [ruby-dev:34583]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 13:24:55 +00:00
matz 98ad274974 * thread.c (rb_thread_key_p): should always convert symbol to ID.
[ruby-dev:34588]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 13:24:03 +00:00
matz 274c6471b8 * numeric.c (fix_divide): float division should floor() before
rounding into integer.  [ruby-dev:34584]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 13:23:24 +00:00
usa ffd4bf96cc * ruby.c (process_options, ruby_set_argv): set encoding of rb_argv
after Init_prelude() because cannot load encoding extensions before
	  it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 11:25:23 +00:00
matz 640a62ea71 * string.c (sym_to_i): remove obsolete method. preparation for
symbol GC.

* numeric.c (fix_to_sym): ditto.

* numeric.c (fix_id2name): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 09:18:06 +00:00
nobu 9757c5450c * io.c (io_puts_ary): check recursion first. [ruby-dev:34580]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 08:43:24 +00:00
nobu 42981462c9 * vm.c (vm_eval_body): initialize retval. [ruby-dev:34576]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 08:41:16 +00:00
nobu c4d11b0525 * .gdbinit (rp): removed RUBY_T_BLOCK.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 07:28:41 +00:00
matz fa16110326 * bignum.c (rb_big_fdiv): flo.fdiv(NaN) should result NaN.
* numeric.c (num_quo): renamed and moved from bignum.c.
  [ruby-dev:34582]

* bignum.c (rb_big_fdiv): update RDoc description

* rational.c (nurat_s_new_m): small refactoring.

* bignum.c (rb_big2dbl): no need for forceful warning when
  converting to float.  overflow is a nature of float values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 04:14:57 +00:00
matz f7b3f1c528 ChangeLog updated
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-06 15:59:41 +00:00
matz 86dfbd3c47 * ext/zlib/zlib.c (gzreader_gets): may cause infinite loop.
[ruby-reference-manual:762]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-06 15:56:21 +00:00
akr 4500a5207d File#lchmod test removed because the method is not exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-06 00:02:01 +00:00
akr 786e7aba7f * test/io/nonblock/test_flush.rb: don't set Thread.abort_on_exception.
* test/net/imap/test_imap.rb: ensure disconnecting imap to terminate
  receiver thread..


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 17:18:09 +00:00
matz 3b13714738 * iseq.c (insn_operand_intern): should handle Qundef embedded in
operand.  [ruby-core:16656]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 15:30:07 +00:00
matz 837c76bd7b * compile.c (iseq_compile_each): should call compile_cpath() for
modules as well.  [ruby-dev:34585]

* insns.def (defineclass): add undef handling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 15:01:42 +00:00
matz 6b1924b176 * insns.def (defineclass): was using wrong variable. [ruby-dev:34592]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 14:51:02 +00:00
matz d7f6b873da * io.c (io_fflush): IO#flush problem within threads. a patch from
<s.wanabe at gmail.com> in [ruby-dev:34595].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 11:12:17 +00:00
matz 58967f4fcd * compile.c (defined_expr): protect some expression from
segmentation fault.  a patch from wanabe <s.wanabe at gmail.com>
  in [ruby-dev:34593].

* compile.c (defined_expr):

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 11:01:10 +00:00
matz 0fb8126bbf * struct.c (rb_struct_s_def): Struct.new(0) should not SEGV.
based on the patch from wanabe <s.wanabe at gmail.com> in
  [ruby-dev:34594].

* struct.c (make_struct): call to_str on name object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 10:52:44 +00:00
akr 50c2a48b85 * eval.c (ruby_cleanup): wrap ruby_finalize_0 by SAVE_ROOT_JMPBUF to
avoid SEGV by at_exit { Fiber.new{}.resume } on IA64.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 08:19:35 +00:00
akr b998a6dbe8 add a test for IA64 Debian GNU/Linux Etch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 06:48:34 +00:00
matz a7d8042774 * array.c (rb_ary_slice_bang): should adjust length before making
sub-array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 03:13:32 +00:00
matz 646988189a * array.c (rb_ary_dup): should dupe corresponding information.
[ruby-dev:34581]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 02:40:13 +00:00
matz a823fc5d8b * compile.c (compile_cpath): use Qundef to denote cbase lookup.
* insns.def (defineclass): Qudef is passed for cbase.

* insns.def (setconstant): ditto.

* vm_insnhelper.c (vm_check_if_namespace): use rb_inspect()
  instead of rb_obj_as_string() for better description.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-05 02:27:29 +00:00
akr 3e8e963837 * gc.c (set_heaps_increment): fix memory allocation strategy by
determining heaps_inc from heaps_used, not objects_delta.
  (struct rb_objspace): delta removed.  change increment, length and
  used to long for LP64.
  (objects_delta): removed.
  (allocate_heaps): add next_heaps_length argument.
  (init_heap): renamed from add_heap.
  (garbage_collect): use heaps_increment in dont_gc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-04 17:25:38 +00:00
akr d3677c3d05 * lib/getoptlong.rb: use $stderr instead of $deferr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-04 12:10:13 +00:00
akr c415a5d66b add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-04 07:49:32 +00:00
akr 04752225a7 * time.c (obj2nsec): fix string argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-04 07:05:26 +00:00
akr f587eab23c * eval.c (rb_obj_respond_to): check the result of respond_to? method
by RTEST.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-04 05:30:08 +00:00
akr 7ef9aba753 * string.c (rb_str_each_line): return original string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-04 03:59:01 +00:00
akr 47dcf6702a add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-03 13:29:11 +00:00
akr 091333f9ea * test/ruby/envutil.rb (Test::Unit::Assertions#assert_normal_exit):
new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-03 11:57:55 +00:00
akr 724d6ffd54 add a test for [ruby-dev:34581].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-03 10:54:43 +00:00
akr 74697788d4 * time.c (time_timespec): raise TypeError for nil and other objects
which has no divmod method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-03 09:12:13 +00:00
akr e5248cfd79 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 16:35:38 +00:00
akr 5d49e1b309 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 16:29:41 +00:00
akr 5fbb3a819c add test for Struct.new(0).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 16:18:26 +00:00
nobu 96b0b1cf82 * io.c (internal_read_func, internal_write_func): split from
internal_io_func.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 14:59:28 +00:00
akr 3a0a3f4ea2 * variable.c (rb_define_hooked_variable): guard *var from GC to
prevent collecting argf under RUBY_DEBUG=gc_stress.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 14:57:23 +00:00
matz f099a94afa * range.c (range_step): call to_int if step is not a numeric
value.  [ruby-dev:34575]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 08:31:04 +00:00
akr 3330ec6cff add tests for [ruby-dev:34557] and [ruby-dev:34558].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 07:52:01 +00:00
matz 7f31465bb5 * range.c (range_step): do not forcefully convert steps into
integers.  [ruby-dev:34571]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 07:15:28 +00:00
matz 546d98b7e8 ChangeLog: updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 06:21:09 +00:00
matz f145325797 * misc/ruby-mode.el: move fontifying code from hook.
[ruby-core:16636]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 06:01:13 +00:00
matz 494f6fcfcf * range.c (range_step): step may be bignum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 05:22:17 +00:00
matz f34a75657d * re.c (Init_Regexp): remove MatchData#select. [ruby-dev:34563]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02 04:57:19 +00:00
nobu 66f98ad5b8 * ChangeLog: reordered.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-01 17:07:46 +00:00
jeg2 3eda519751 Adding accidentally skipped ChangeLog entry.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-01 15:05:31 +00:00
nobu b5f2df6b9e * bignum.c (rb_big_divide), numeric.c (fix_divide): check for result
domain.  [ruby-dev:34559]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-01 15:00:01 +00:00
jeg2 582983c224 * lib/net/telnet.rb: This patch from Brian Candler adds a FailEOF mode which
can be activated to have net/telnet raise EOFError exceptions when the 
  remote connection is closed.  The default behavior remains unchanged though.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-01 14:57:40 +00:00