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

340 Коммитов

Автор SHA1 Сообщение Дата
kazu 327ea26b59 * ext/bigdecimal/README: Update redmine.ruby-lang.org to bugs.ruby-lang.org
* ext/socket/ancdata.c: ditto
* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb: ditto
* test/syck/test_yaml.rb: ditto
* doc/ChangeLog-1.9.3: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-20 16:09:17 +00:00
nobu 9dccfb5513 * error.c (rb_check_typeddata): refine error message with
including expected struct name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-15 05:33:34 +00:00
naruse aa432d2334 FreeBSD 9.0 RC3 is now released.
See also r33677, r33967, and r33973.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-14 00:28:26 +00:00
naruse 09c399b68e It is fixed in FreeBSD 9.0 RC3, not RC2.
So skip until it is released.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-07 22:13:04 +00:00
naruse 1b99ecc5a2 FreeBSD 9.0 RC2 fixes the bug.
FreeBSD PR: kern/155606, kern/162379

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-07 00:32:37 +00:00
naruse f6f4534382 * variable.c (rb_path2class): don't raise NameError when the middle
constant of the path is not defined but defined on toplevel.
  [ruby-core:41410] [Bug #5691]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-30 14:44:06 +00:00
kosaki ed681d3a82 * bignum.c (rb_big2ull): fix 32bit platform breakage. we must
not assume sizeof(VALUE) == sizeof(LONG_LONG).
* test/-ext-/num2int/test_num2int.rb (class TestNum2int):
  fix false assumption on 32bit platform.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 05:56:09 +00:00
kosaki b2a2ba1191 * include/ruby/ruby.h: add NUM2SHORT(), NUM2USHORT() macros.
* numeric.c: ditto.

* test/-ext-/num2int/test_num2int.rb: add testcases for NUM2SHORT().
* ext/-test-/num2int/num2int.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:54:34 +00:00
kosaki d3437b7c1a * bignum.c (rb_big2ull): fix off-by-twice bug of NUM2ULL.
* test/-ext-/num2int/test_num2int.rb (class TestNum2int):
  fix a testcase too.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:51:56 +00:00
kosaki 11137bed53 * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
add FIXNUM tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:47:21 +00:00
kosaki 74a13c7634 * numeric.c (check_uint): fix off-by-one bug of NUM2UINT.
* bignum.c (rb_big2ulong): fix off-by-one bug of NUM2ULONG.

* test/-ext-/num2int/test_num2int.rb: add a testcase for NUM2INT()
  NUM2UINT(), NUM2LONG(), NUM2ULONG(), NUM2LL and NUM2ULL().
* ext/-test-/num2int/depend: ditto.
* ext/-test-/num2int/extconf.rb: ditto.
* ext/-test-/num2int/num2int.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:45:47 +00:00
naruse 3d855def9e FreeBSD 8.2 sticks this [ruby-dev:44726] [Bug #5524]
http://redmine.ruby-lang.org/issues/5524

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 17:13:03 +00:00
naruse 632f448827 On some platforms, object_id can be negative value like NetBSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-01 00:42:41 +00:00
nobu 72cbec3f6d * util.c (mmprepare): fix for fragmental size.
* util.c (mmswap_, mmrot3_): portability improvement.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-20 02:42:26 +00:00
nobu d5e7b3972c * test/-ext-/symbol/test_inadvertent_creation.rb (noninterned_name):
sigil of global, instance and class variable names should be
  followed by non-numeric.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-07 11:29:37 +00:00
nobu 881891fb2f * test/-ext-/symbol/test_inadvertent_creation.rb: moved tests from
test_module.rb and test_symbol.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-07 08:57:42 +00:00
nobu 89fef02f13 * vm_eval.c (make_no_method_execption): extract from
raise_method_missing().
* vm_eval.c (send_internal): remove inadvertent symbol creation
  from public_send.  based on a patch by Jeremy Evans <code AT
  jeremyevans.net> in [ruby-core:38576]. [Feature #5112]
* vm_insnhelper.c (vm_call_method): remove inadvertent symbol
  creation from send and __send__, too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-06 07:29:33 +00:00
kosaki d4db53a0e0 * test/-ext-/old_thread_select/test_old_thread_select.rb:
select() with timeout may return early in old Linux kernels
  with 250 Hz tickrate and no dynticks, so skip everything older
  than 2.6.32 (which has long term support).
  And, Make the timing assertions consistently use assert_operator with
  timing difference in error message
  Patch by Eric Wong. [Bug #5335] [ruby-core:39618]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-19 09:47:27 +00:00
kosaki 2c9375ba69 * thread.c (rb_thread_select): fix to ignore an argument
modification of rb_thread_fd_select().
  based on a patch by Eric Wong. [Bug #5306] [ruby-core:39435]
* thread.c (rb_fd_rcopy): New. for reverse fd copy.

* test/-ext-/old_thread_select/test_old_thread_select.rb
(test_old_select_false_positive): test for bug5306.

* ext/-test-/old_thread_select/old_thread_select.c (fdset2array):
  New. convert fdsets to array.
* ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
  return 'read', 'write', 'except' argument of rb_thread_select()
  to ruby script.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-12 11:36:06 +00:00
nobu 61b062ba6d * thread.c (rb_thread_select): fix a typo to initialize efds
properly.  [Bug #5299] [ruby-core:39380]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-09 01:22:06 +00:00
naruse 90c33c2198 Use assert_operator to show clear message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-06 08:11:21 +00:00
usa 13a77870de * test/-ext-/old_thread_select/test_old_thread_select.rb
(TestOldThreadSelect#test_old_select_read_timeout): if the machine
  is fast enough, the time used by code around IO.select may be smaller
  than Time implement threshold.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30 15:34:54 +00:00
usa 34e65bee79 * ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
typo.

* test/-ext-/old_thread_select/test_old_thread_select.rb
  (TestOldThreadSelect#test_old_select_signal_safe): use SIGINT instead
  of SIGUSR1 because the former is general and the latter is platform
  dependent.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30 15:07:21 +00:00
kosaki 0cebfad20a * thread.c (rb_thread_select): rewrite by using
rb_thread_fd_select(). old one is EINTR unsafe.
  Patch by Eric Wong. [Bug #5229] [ruby-core:39102]

* test/-ext-/old_thread_select/test_old_thread_select.rb:
  a testcase for rb_thread_select().
* ext/-test-/old_thread_select/old_thread_select.c: ditto.
* ext/-test-/old_thread_select/depend: ditto.
* ext/-test-/old_thread_select/extconf.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30 00:33:05 +00:00
usa f9e9eee677 * util.c, include/ruby/util.h (ruby_add_suffix): remove the function.
[Bug #5153] [ruby-core:38736]

* io.c (argf_next_argv): remove the call of above function.

* ext/-test-/add_suffix, test/-ext-/test_add_suffix.rb: remove the test
  extension module because this is only for testsing ruby_add_suffix().

* LEGAL: remove the mention about a part of util.c, because now we
  removed the part.

* io.c (argf_next_argv): now the new filename is not guranteed to
  use, so should check the return value of rename(2).

* test/ruby/test_argf.rb (TestArgf#test_inplace_rename_impossible):
  now we expect same result with other platforms on no_safe_rename
  platforms (=Windows).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-03 07:10:56 +00:00
nobu cfa0035962 * encoding.c (rb_enc_set_index, rb_enc_associate_index): should
check if frozen.
* parse.y (rb_intern3), ruby.c (process_options, ruby_script):
  defer freezing after associating encodings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-07 06:44:46 +00:00
kosaki c06da4735d * thread.c (rb_wait_for_single_fd): Fix wrong return value.
* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb
(TestWaitForSingleFD#test_wait_for_closed_pipe): test for it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-04 10:02:06 +00:00
kosaki 2a989121db * ext/-test-/wait_for_single_fd: New. for testing
rb_wait_for_single_fd() internal function.
  The patch was written by Eric Wong. [ruby-core:35991]

* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-04 09:50:27 +00:00
nobu 247fdeedf8 * include/ruby/ruby.h (rb_funcall_passing_block): add prototype.
a patch by James M. Lawrence at [ruby-core:35501]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-17 15:54:22 +00:00
nobu f989f7c7ea * string.c (rb_str_ellipsize): new function to ellipsize a string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 04:01:58 +00:00
nobu 7a6113d6b6 * string.c (rb_string_value_cstr): rb_str_modify can change
RSTRING_PTR.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-24 22:00:55 +00:00
nobu 5631792727 * ext/-test-/array/resize/resize.c (Init_resize): renamed method
for test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 20:47:01 +00:00
nobu c8aaf31fdd * array.c (rb_ary_resize): new utility function. [ruby-dev:42912]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 20:10:59 +00:00
nobu 697a45b196 * dln.c (init_funcname_len): ignore rest from first dot.
[ruby-dev:41774]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05 20:03:28 +00:00
nobu fd0485acf7 * vm_eval.c (vm_call0): fix for VM_METHOD_TYPE_NOTIMPLEMENTED.
[ruby-dev:41953]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 04:33:33 +00:00
nobu 8965ed167d * string.c (rb_str_set_len): should fail to modify shared string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 07:42:47 +00:00
nobu 5f13d888cf * string.c (rb_str_resize): reverted r28851. rb_str_resize cannot
work before the length is set.  [ruby-core:31615]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04 11:08:28 +00:00
nobu 99d96a89ce * string.c (rb_str_resize): should copy the content properly. a
patch from Jeremy Evans at [ruby-core:31615].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04 07:09:47 +00:00
nobu 7ae7ac4aba * util.c (ruby_add_suffix): fixed a bug returning uninitialized
value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-29 22:59:54 +00:00
nobu 0f36e8fc03 * eval.c (frame_func_id), vm_eval.c (rb_iterate),
vm_insnhelper.c (vm_yield_with_cfunc): as the name of a C-level
  block, use the current method ID at the creation point.
  [ruby-dev:41852]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-14 11:23:10 +00:00