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

15960 Коммитов

Автор SHA1 Сообщение Дата
nagachika 6b06ba0c05 * node.c (add_id): remove duplicated rb_id2str() call.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 14:29:49 +00:00
akr ff4ba406a2 * missing/langinfo.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 13:08:27 +00:00
kosaki 7fb70b4e0f * configure.in: revert r30698.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 12:59:54 +00:00
nagachika a2ba50d971 * thread.c (thread_start_func_2): check deadlock condition before
release thread stack. fix memory violation when deadlock detected.
	  reported by Max Aller. [Bug #4009] [ruby-core:32982]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 12:40:19 +00:00
nagachika d07940ee13 * ChangeLog: fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 11:57:14 +00:00
yugui 9a89f325e4 * lib/irb/locale.rb (IRB::Locale::#search_file):
Gem might be undefined if --disable-gems. [ruby-core:34990]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 05:46:50 +00:00
naruse 48de1e292a * addr2line.c: suppressed shorten-64-to-32 warnings.
* regcomp.c: ditto.
* regexec.c: ditto.
* regint.h: ditto.
* regparse.c: ditto.
* regparse.h: ditto.
* time.c: ditto.
* variable.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 03:44:57 +00:00
naruse a924b1768f Add ML Reference and a test for r30736 [ruby-core:34997]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 21:00:04 +00:00
naruse 88a9b87816 * array.c (rb_ary_uniq_bang): call ARY_SET_LEN(ary, 0) before
rb_resize_capa because rb_resize_capa expects resized length is
  smaller than current array length. call rb_ary_unshare before
  rb_resize_capa because rb_resize_capa losts the reference to
  original shared array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 20:42:40 +00:00
akr 627e79f13f * missing/crypt.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 08:20:20 +00:00
nobu ce00071053 * test/rubygems/test_gem_security.rb (TestGemSecurity): valid only
if OpenSSL is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 07:40:31 +00:00
nobu 59064a75b8 * test/dl/test_dl2.rb (TestDL#test_sin): math functions do not
work on x86_64 due to the design of DL2.
* test/dl/test_func.rb (DL::TestFunc#test_{sinf,sin): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 07:15:23 +00:00
akr 2418e5ca83 * strftime.c (rb_strftime_with_timespec): %G produces 4 digits.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 07:10:55 +00:00
nobu b4be48e88d * enc/emacs_mule.c (emacsmule_islead): 7bit range is also leading
byte.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 06:13:25 +00:00
nobu 46142e472f * hash.c (rb_hash_fetch_m): use useful message for longer key, not a
nonsense id value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 04:03:19 +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 4dcc883d06 * include/ruby/encoding.h (rb_enc_step_back): new function to step
back n characters.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 03:56:16 +00:00
nobu 286615d430 * enc/emacs_mule.c (emacsmule_islead): fix inverse condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 03:53:44 +00:00
kanemoto 2a5177e757 io.c (struct argf): char behaves like an unsigned char by default on AIX.
http://publib.boulder.ibm.com/infocenter/comphelp/v111v131/index.jsp?topic=/com.ibm.xlcpp111.aix.doc/language_ref/ch.html


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 01:02:46 +00:00
naruse 33671c826d * configure.in: Mac OS X wrongly reports it has fdatasync(3).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-29 23:03:47 +00:00
naruse 5323407175 * ext/openssl/ossl_bn.c (GetBNPtr): add missing nil case.
patched by Martin Bosslet. [ruby-core:34987]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-29 18:48:24 +00:00
kosaki eea774d029 * include/ruby/ruby.h: Added NUM2MODET() and MODET2NUM() default definition.
Because r30686 introduced win32 build failure.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-29 16:06:00 +00:00
naruse 674ea103fa * array.c (rb_ary_join): [].join.encoding must be US-ASCII.
[ruby-list:47790]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-29 15:33:50 +00:00
kosaki 1195ba6644 * benchmark/driver.rb (BenchmarkDriver#measure): Show command line
when abnormal exiting occur.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-29 11:23:42 +00:00
mame 5b74e4f09e * vm_insnhelper.c (vm_get_ev_const): no-scope reference to toplevel
private constant has been prohibited incorrectly.

* test/ruby/test_module.rb (test_toplevel_private_constant): add a
  test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-29 02:01:19 +00:00
ryan 934f537b45 Import rubygems 1.5.0 (release candidate @ 09893d9)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 23:46:47 +00:00
mame b511e1bfbe * variable.c (rb_mod_const_of, sv_i): Module#constant should exclude
private constants.  see [ruby-core:32912].

* test/ruby/test_module.rb (test_constants_with_private_constant): add
  a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 17:57:48 +00:00
mame b1e829fb30 * variable.c (rb_const_set): const_set shoud preserve constant
visibility.  see [ruby-core:32912].

* test/ruby/test_module.rb: add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 17:57:42 +00:00
mame a2ec8666cf * compile.c (NODE_CLASS, NODE_MODULE), insns.def (defineclass): raise
an exception when "class Foo::Bar" is evaluated and Foo::Bar is
  private.  To implement this, define_type of "defineclass" is added
  so that the instruction can distinguish whether the class definition
  is scoped (class Foo::Bar) or not (class Bar).

* test/ruby/test_class.rb (test_redefine_private_class),
  test/ruby/test_module.rb
  (test_define_module_under_private_constant): add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 17:57:34 +00:00
mame f0483c494f * constant.h, variable.c: to ensure compatibility, rb_const_get_* must
not raise an exception even when the constant is private.  Instead,
  rb_public_const_get_* and rb_public_const_defined_* are introduced,
  which raise an exception when the referring constant is private.
  see [ruby-core:32912].

* vm_insnhelper.c (vm_get_ev_const): use rb_public_const_get_* instead
  of rb_const_get_* to follow the constant visibility when user code
  refers a constant.

* test/ruby/test_marshal.rb (test_marshal_private_class): add a test.
  This test had failed because of incompatibility of rb_const_get.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 17:57:27 +00:00
mame b9a1e36c15 * variable.c (set_const_visibility): fix typo. a patch from Tomoyuki
Chikanaga in [ruby-core:32919].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 17:57:19 +00:00
kosaki 77a7137c4b * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_no_create,
TestGDBM2#test_writer_open_notexist): We only need to skip libgdbm 1.8.0,
	not all 1.8.x. 1.8.1 or later don't have GDBM_WRITER sickness.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 14:23:04 +00:00
kosaki cb96213fad * ext/dbm/extconf.rb: Added new header places for Fedora13.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 12:58:15 +00:00
akr f6de1a3f00 * ext/zlib/zlib.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 12:49:53 +00:00
kosaki 3a0ec68109 * test/gdbm/test_gdbm.rb (TestGDBM2#test_writer_open_notexist):
gdbm 1.8.x changed GDBM::WRITER behavior. Thus our testcase need
	  to be changed too.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 08:50:18 +00:00
kosaki 36f71db31e * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_no_create): skip
the test if gdbm version is 1.8.x.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 08:36:46 +00:00
kosaki a3d861ef2f * test/ruby/test_require.rb (TestRequire#test_require_too_long_filename):
Added -w option because too long path error don't output a message
	  by default since r30660. [Bug #4336] [ruby-dev:43134]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 07:31:44 +00:00
kosaki bacc7e6a42 * test/ruby/test_require.rb (TestRequire#test_require_path_home_{1,2}):
Added -w option because too long path error don't output a message
	  by default since r30660. [Bug #4336] [ruby-dev:43134]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 07:21:38 +00:00
kosaki 29422e5d31 * test/ruby/test_require.rb (TestRequire#test_require_path_home_{1,2,3}):
split from test_require_path_home.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 07:06:48 +00:00
kosaki aea93cbed8 * configure.in (--with-valgrind): Fixed r29683. Now this option
is really default on.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 04:05:23 +00:00
kosaki cb1366b48f * configure.in: Add #include<sys/stat.h> when struct stat is
tested. Otherwise, incomplete type dereference error will occur.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 03:07:23 +00:00
kosaki 39473b88a9 * configure.in: redundant variable names made strange conftest
error. Fixed it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 02:57:21 +00:00
usa d4f8142d18 * test/ruby/test_process.rb (TestProcess#test_too_long_path{,2}):
should handle Errno::E2BIG, because this test checks crash of ruby,
  not the error type system.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 02:48:46 +00:00
kosaki 4afa5fead8 * io.c (rb_io_open): Use NUM2MODET() instead NUM2UINT().
* io.c (rb_scan_open_args): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 02:23:58 +00:00
kosaki 92c1dfd9d2 * configure.in: Added mode_t type checking.
* process.c (rb_exec_arg_addopt): Use NUM2MODET() instead
	  NUM2LONG because clang makes compile error by this narrowing
	  conversion.
	* process.c (rb_run_exec_options_err): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 02:00:08 +00:00
kosaki 58da04b398 * re.c (rb_reg_raise): add GC guard to prevent intermediate
variable from GC.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 17:37:30 +00:00
kosaki 1e60af4d67 * hash.c (rb_hash_fetch_m): add GC guard to prevent intermediate
variable from GC.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 17:36:32 +00:00
kosaki 41bbb319dd * test/ruby/test_process.rb (TestProcess#test_too_long_path)
TestProcess#test_too_long_path): Reduced string size from 100MB
	  to 10MB. 100MB may cause no memory error. It isn't intended.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 16:36:21 +00:00
kosaki 6c2b2c2853 * test/ruby/test_process.rb (TestProcess#test_too_long_path2):
Factored out from test_too_long_path. A test should only do
	  one test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 16:33:23 +00:00
nobu 4a42b101a9 * st.c (st_foreach): check if unpacked.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 14:30:00 +00:00