Commit graph

3995 commits

Author SHA1 Message Date
naruse
c1303fbe8a merge revision(s) 34255: [Backport #6035]
* test/readline/test_readline.rb (test_completion_proc_empty_result): rescue NoMemoryError.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 03:25:38 +00:00
naruse
54209dd172 merge revision(s) 34115:
* test/readline/test_readline.rb (test_line_buffer__point): use
	  lambda not to exit entire method by "return".  or "next" for
	  proc.  [ruby-dev:45042] [Bug #5802]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 02:47:10 +00:00
naruse
3558675488 merge revision(s) 34646:
* test/dbm/test_dbm.rb: fix skip condition for libgdbm 1.8.0 or prior.
	  reported by Bohuslav Kabrda.
	  [ruby-core:42685] [ruby-trunk - Bug #6036]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 01:14:57 +00:00
naruse
4f05bf852b merge revision(s) 32731,32734,32738:
------------------------------------------------------------------------
r32731 | naruse | 2011-07-29 16:17:35 +0900 (Fri, 29 Jul 2011) | 3 lines

Use setrlimit(NOFILE,1) on OpenBSD.

Because on OpenBSD it freezes if limit=0.
------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-16 00:25:11 +00:00
naruse
8cdf5c4179 merge revision(s) 34629,34630:
* cont.c (rb_fiber_reset_root_local_storage): add a new function to
	  restore rb_thread_t::local_storage.

	* cont.c (rb_obj_is_fiber): add a new function to tell finalizer to
	  prevent fibers from destroy.

	* gc.c (rb_objspace_call_finalizer): don't sweep fibers at finalizing
	  objspace.

	* internal.h (rb_fiber_reset_root_local_storage, rb_obj_is_fiber):
	  add prototypes.

	* vm.c (ruby_vm_destruct): reset main thread's local_storage before
	  free main thread. rb_thread_t::local_storage is replaced by fiber's
	  local storage when forked from fiber, and it should be already freed
	  when the fiber was destroyed.

	* test/ruby/test_fiber.rb (test_fork_from_fiber): add test for fork
	  from fiber.
	  when the fiber was destroyed. [ruby-core:41456] [Bug #5700]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15 22:34:48 +00:00
naruse
a4debd6ae2 merge revision(s) 34626,34627:
* ext/fiddle/closure.c (callback): same as r34506.

	* ext/fiddle/closure.c (callback): deal with unsinged integers.
	  [ruby-core:42458][Bug #5991][Bug #6022]

	* ext/fiddle/conversions.c (value_to_generic, generic_to_value):
	  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15 21:31:16 +00:00
nobu
e56eea5e37 merge revision(s) r34564:
* vm_eval.c (check_funcall):  Call respond_to? with matching arity for
	  legacy single-argument implementations.  [ruby-trunk - Bug #6000]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15 01:33:56 +00:00
nobu
afcd5562ae merge revision(s) r32855,r32857,r33493,r34554:
* vm_eval.c (check_funcall): try respond_to? first if redefined.
	  [Bug #5158]

	* test/ruby/test_object.rb: tests that respond_to? returns false.

	* vm_eval.c (check_funcall): set array elements one-by-one to fix
	  compile error with Fujitsu C Compiler 5.6 on Solaris 10 on Sparc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15 01:29:34 +00:00
naruse
00af7b8f9a merge revision(s) 34555: [Backport #5786]
* compile.c (defined_expr): guard the whole expression.
	  [ruby-dev:45021][Bug#5786]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-14 22:16:06 +00:00
naruse
35c546104b merge revision(s) 32712,32718,32719: [Backport #6014]
* ext/dl/cfunc.c (dlcfunc_mark), ext/dl/cptr.c (dlptr_mark):
	  workaround to mark wrapped object.  this is not a true fix,
	  because [Bug #4929] is caused by the interface design of DL.

	* ext/dl/cptr.c (rb_dlptr_s_to_ptr): fix wrapping condition.

	* ext/dl/cptr.c (rb_dlptr_s_to_ptr): fix wrapping condition.

	* ext/dl/cptr.c (rb_dlptr_s_to_ptr): use rb_check_funcall.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-14 20:09:27 +00:00
naruse
0c8cfb4eab merge revision(s) 32720: [Backport #6015]
* ext/dl/cptr.c (rb_dlptr_aref, rb_dlptr_aset): check NULL pointer
	  dereference.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-14 20:05:04 +00:00
naruse
44d3cf03fd merge revision(s) 32705,32717: [Backport #6016]
* test/rinda/test_rinda.rb (test_remote_array_and_hash):
	  add local variables to protect objects from GC. [ruby-dev:44253]
	  [Bug #5104]

	* test/rinda/test_rinda.rb: decrease the code that depends on timing.
	  [Bug #372] [Bug #4160]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-14 20:04:06 +00:00
naruse
dbda1e9ea7 merge revision(s) 32640: [Backport #6017]
* test/win32ole/test_err_in_callback.rb (test_err_in_callback): 
	  skip test if ADODB.connection is not available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-14 20:03:06 +00:00
usa
39432526b6 merge revision(s) 33902:
* lib/rdoc/encoding.rb (RDoc::Encoding.read_file): fixup newline chars
  on Windows.
  see https://github.com/rdoc/rdoc/issues/87

* test/rdoc/test_rdoc_markup_pre_process.rb
  (TestRDocMarkupPreProcess#test_include_file, 
  TestRDocMarkupPreProcess#test_include_file_encoding_incompatible):
  follow above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-14 07:55:37 +00:00
usa
ac81a6e38d merge revision(s) 33232:
* test/rubygems/test_gem_commands_help_command.rb: Add one
  `require` because if run test-all with test/unit parallel
  running, sometimes this test fails by some constants not found.
  The error reason is some worker doesn't require the file needed by
  this test. This issue is related to [ruby-core:36168].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-14 07:36:03 +00:00
usa
1bf61d770a merge revision(s) 34395:
* test/irb/test_completion.rb: skip if cannot load irb/completion
  (maybe readline does not exist).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-14 06:45:33 +00:00
naruse
e782ca865b merge revision(s) 33935,33936,33987: [Backport #5702]
* variable.c (set_const_visibility): Module#private_constant has
	  changed the visibility of only the first argument.  Now it changes
	  all of them.  [ruby-list:48558]

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

	* variable.c (set_const_visibility): print a warning when no argument
	  is passwd to Module#private_constant.  [ruby-list:48558]

	* vm_method.c (set_method_visibility): ditto for
	  Module#private_class_method.

	* variable.c (set_const_visibility): clear inine-cache when constant's
	  visibility is modified. [ruby-dev:44929]

	* test/ruby/test_module.rb (test_private_constants_clear_inlinecache):
	  add test for it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-13 04:51:21 +00:00
knu
c9fac6977b merge revision(s) 34284:34286:
* lib/shellwords.rb: Fix rdoc markups.

	* lib/shellwords.rb (Shellwords#shellsplit): Fix a bug where
	  consecutive backslashes in double quotes are all removed except
	  the one at the tail.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-12 07:51:05 +00:00
knu
b760f18a9f merge revision(s) 34166:
* lib/shellwords.rb (Shellwords#shellescape): Drop the //n flag
	  that only causes warnings with no real effect.  [Bug #5637]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-12 07:38:38 +00:00
naruse
7d86051f25 merge revision(s) 32527,32567: [Backport #6004]
* vm_method.c (rb_add_method): should not call method_added hook
	  for undef operation. [Bug #5015]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-12 00:42:37 +00:00
naruse
83af59b8d6 merge revision(s) 33508:
* test/openssl/test_ssl.rb (test_multibyte_read_write): start server
	  for each length to avoid race condition.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 23:06:56 +00:00
naruse
c0cdff2c0f Revert r34538.
* backport 33935,33936,33987 (fix private constant)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 21:32:02 +00:00
naruse
a208a75072 merge revision(s) 34043,34045,34132: [Backport #5791]
* win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function.

	* win32/win32.c (init_stdhandle): set default mode of stdin as binmode.

	* io.c (set_binary_mode_with_seek_cur): new function to replace
	  SET_BINARY_MODE_WITH_SEEK_CUR macro.  now returns previous mode of the
	  fd and take care of LF in rbuf.

	* io.c (do_writeconv): set text mode when needed.

	* io.c (io_read): need to change the mode of the IO to binmode
	  temporally when the length for IO#read, because IO#read with length
	  must behave so.

	* test/ruby/test_io_m17n.rb (TestIO_M17N#est_{read_with_length,
	  read_with_length_binmode,get[cs]_and_read_with_binmode,
	  read_with_binmode_and_get[cs],read_write_with_binmode}): tests for
	  above changes.
	all patches are written by Hiroshi Shirosaki. [ruby-core:41496]
	[Feature #5714]

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_{read_with_binmode_and_get[cs]}): only for Windows.

	* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{read_with_length,

	* io.c (rb_sys_fail_path): move the definition.
	  Move above for using it in set_binary_mode_with_seek_cur().

	* io.c (set_binary_mode_with_seek_cur): fix improper seek cursor.
	  Seeking file cursor with setting binary mode has possibility to
	  cause infinite loop. Fixed the bug and refined error handling.
	  Introduced at r34043.
	  And cleanups as below.
	  Remove unnecessary parentheses of `fptr`.
	  Use return value of setmode().

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_seek_with_setting_binmode): add a test for abobe.
	  [ruby-core:41671] [Bug #5714]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 18:39:05 +00:00
naruse
8774691972 merge revision(s) 33981: [Backport #5792]
* test/rexml/test_order.rb (OrderTester#test_more_ordering): use
	  GZip::GzReader.open instead of GZip::GzReader.new with File.new.
	  fixed a test error on Windows introduced at r33946.
	  fixed test errors on Windows introduced at r33953.
	  fixed test errors on Windows introduced at r33947.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 18:38:08 +00:00
naruse
773b80bf36 merge revision(s) 33937: [Backport #5704]
* ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default
	  under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706]
	  [Feature #5562]

	* include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE
	  decorator.

	* io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and
	  NEED_WRITECONV to replace universal newline decorator by CRLF only
	  when required to improve file reading and writing under Windows.
	  Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562]

	* io.c (do_writeconv): adjust binary mode if required.

	* io.c (read_all, appendline, swallow, rb_io_getline_1): ditto.

	* io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto.

	* io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto.

	* io.c (rb_io_extract_modeenc, rb_sysopen): ditto.

	* io.c (pipe_open, prep_stdio, io_encoding_set): ditto.

	* io.c (rb_io_s_pipe, copy_stream_body): ditto.

	* test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in
	  binary mode.

	* win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle
	  initialization.

	* win32/win32.c (rb_w32_write): use FTEXT mode accordingly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 18:24:25 +00:00
naruse
093ade0eb8 merge revision(s) 33662,33666,33770: [Backport #5793]
------------------------------------------------------------------------
r33662 | usa | 2011-11-08 02:48:11 +0900 (Tue, 08 Nov 2011) | 18 lines

* include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,
  ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro.

* io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv):
  set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO
  if the flag is available.

* io.c (make_writeconv): drop decorators for reading.

* io.c (make_readconv): drop decorators for writing.

* io.c (do_writeconv): existing writeconv is not the condition to raise
  ArgumentError.  should check textmode or not.

* test/ruby/test_io_m17n.rb
  (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above
  changes.

------------------------------------------------------------------------

	* include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,
	  ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro.

	* io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv):
	  set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO
	  if the flag is available.

	* io.c (make_writeconv): drop decorators for reading.

	* io.c (make_readconv): drop decorators for writing.

	* io.c (do_writeconv): existing writeconv is not the condition to raise
	  ArgumentError.  should check textmode or not.

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above
	  changes.

	* io.c (argf_next_argv): wrong timing of setting ecflags.
	  fixed the failure of TestArgf#test_textmode introduced at r33662.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 18:21:01 +00:00
naruse
45501becfb merge revision(s) 33152,33649:
* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
	  default_mode_on_unix,text_mode,binary_mode}): sorry for wrong test
	  committed in r33144.  I'd misunderstood the spec of ruby's universal
	  newline.

	* test/ruby/test_io_m17n.rb
	  (TestIO_M17N#test_default_stdout_stderr_mode): new test for
	  r33627-33629.  see [backport #5565]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 18:19:57 +00:00
naruse
3d3cf9705b merge revision(s) 33144:
* test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
	  default_mode_on_unix,text_mode,binary_mode}): tests for [Bug #5164].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 18:18:48 +00:00
naruse
04e65c3862 merge revision(s) 33200: [Backport #5794]
* transcode.c: enabled econv newline option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 18:13:56 +00:00
naruse
84a867fae8 merge revision(s) 33935,33936,33987:
* variable.c (set_const_visibility): Module#private_constant has
	  changed the visibility of only the first argument.  Now it changes
	  all of them.  [ruby-list:48558]

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

	* variable.c (set_const_visibility): print a warning when no argument
	  is passwd to Module#private_constant.  [ruby-list:48558]

	* vm_method.c (set_method_visibility): ditto for
	  Module#private_class_method.

	* variable.c (set_const_visibility): clear inine-cache when constant's
	  visibility is modified. [ruby-dev:44929]

	* test/ruby/test_module.rb (test_private_constants_clear_inlinecache):
	  add test for it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 18:12:08 +00:00
naruse
2c5d6bae4d merge revision(s) 33485:
* lib/openssl/buffering.rb: Force multi-byte strings to be treated as
	  binary data.

	* test/openssl/test_ssl.rb: Add test for it.
	Thanks to Niklas Baumstark for reporting the issue!
	[Ruby 1.9 - Bug #5233] [ruby-core:39120]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10 17:27:22 +00:00
naruse
513b0988f0 merge revision(s) 33517:
------------------------------------------------------------------------
r33517 | naruse | 2011-10-24 15:41:57 +0900 (Mon, 24 Oct 2011) | 6 lines

Follow the error format changed by FreeBSD 9.

FreeBSD 8.2's last line is
"./configure: Can't open ./configure: No such file or directory\n""
but FreeBSD 9's is
"cannot open ./configure: No such file or directory\n"".
------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 21:13:27 +00:00
naruse
36b3d5577c merge revision(s) 34409,34412,34417:
* io.c (argf_close): skip stdin, which should be readable again.
	  [ruby-dev:45160] [Bug #5952]

	* io.c (argf_readlines): reinitialize after all read to be
	  readable again.

	* io.c (argf_next_argv): reset ARGF.next_p on ARGV.replace.
	  r34409 breaks replacing ARGV.
	  [ruby-dev:45160] [Bug #5952]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 20:12:02 +00:00
emboss
0234bcfd19 * backport r34482 from trunk
* ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSL
  option to prevent BEAST attack. See [Bug #5353].

  In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent
  TLS-CBC-IV vulunerability described at
  http://www.openssl.org/~bodo/tls-cbc.txt
  It's known issue of TLSv1/SSLv3 but it attracts lots of attention
  these days as BEAST attack. (CVE-2011-3389)

  Until now ossl sets OP_ALL at SSLContext allocation and call
  SSL_CTX_set_options at connection.  SSL_CTX_set_options updates the
  value by using |= so bits set by OP_ALL cannot be unset afterwards.
  This commit changes to call SSL_CTX_set_options only 1 time for each
  SSLContext. It sets the specified value if SSLContext#options= are
  called and sets OP_ALL if not.

  To help users to unset bits in OP_ALL, this commit also adds several
  constant to SSL such as
  OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.  These constants were
  not exposed in Ruby because there's no way to unset bits in OP_ALL
  before.

  Following is an example to enable 0/n split for BEAST prevention.

    ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS

* test/openssl/test_ssl.rb: Test above option exists.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 17:04:41 +00:00
naruse
b97d91dd4a merge revision(s) 34504,34506,34507,34508:
* ext/dl/lib/types.rb: Win64 support.

	* ext/fiddle/conversions.c (value_to_generic): src is not guranteed as
	  a Bignum if the type is LONG_LONG.  it may be a Fixnum if the value
	  is small.

	* ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}):
	  currenly pack/unpack does not accept "q!" and "Q!".

	* test/ruby/memory_status.rb (Memory::Win32): 64bit support.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 07:20:53 +00:00
naruse
8b322b5cf6 merge revision(s) 34338-34340: [Backport #5909]
* test/ruby/test_file_exhaustive.rb (test_expand_path): add tests for
	  absolute paths and drive letters.  [ruby-core:42177]

	* test/ruby/test_file_exhaustive.rb (test_expand_path): ignore case of
	  paths on DOSISH platforms.

	* test/ruby/test_file_exhaustive.rb (test_expand_path): fix commit
	  miss, removed surplus downcase.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 02:23:16 +00:00
naruse
e0f8351d55 merge revision(s) 34236: [Backport #5890]
* numeric.c (rb_enc_uint_char): raise RangeError when added codepoint
	  is invalid. [Feature #5855] [Bug #5863] [Bug #5864]

	* string.c (rb_str_concat): ditto.

	* string.c (rb_str_concat): set encoding as ASCII-8BIT when the string
	  is US-ASCII and the argument is an integer greater than 127.

	* regenc.c (onigenc_mb2_code_to_mbclen): rearrange error code.

	* enc/euc_jp.c (code_to_mbclen): ditto.

	* enc/shift_jis.c (code_to_mbclen): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 22:34:12 +00:00
naruse
2bd2ea829f merge revision(s) 34499:
* test/pathname/test_pathname.rb: not read but binread.
	  patched by Benoit Daloze, [ruby-core:42440] [Bug #5984]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 22:31:55 +00:00
naruse
42c6255260 merge revision(s) 34497:
------------------------------------------------------------------------
r34497 | naruse | 2012-02-09 03:29:52 +0900 (Thu, 09 Feb 2012) | 1 line

FreeBSD needs multiple -o.
------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 18:30:35 +00:00
nobu
c709040b3f * test/-ext-/string/test_modify_expand.rb: test for r34492.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 13:35:27 +00:00
naruse
9a57bc8f55 merge revision(s) 34490: [Backport #5983]
------------------------------------------------------------------------
r34490 | naruse | 2012-02-08 20:47:00 +0900 (Wed, 08 Feb 2012) | 1 line

Fix condition.
------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 11:47:47 +00:00
naruse
ee19d5864e merge revision(s) 34481,34488: [Backport #5983]
* ext/openssl/ossl_x509name.c: Use the numerical representation of
	  unrecognized OIDs instead of the sn "UNDEF".
	  

	* test/openssl/test_x509name.rb: Add tests for the fixed behavior.
	  
	  Patch provided by Paul Kehrer, thank you!
	  [ruby-core:41769] [Feature #5787]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 09:51:53 +00:00
naruse
9e2e9208f7 merge revision(s) 34394,34398:
------------------------------------------------------------------------
r34394 | naruse | 2012-01-29 23:24:05 +0900 (Sun, 29 Jan 2012) | 1 line

Skip test if locale is not Japanese nor UTF-8.
------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 06:42:39 +00:00
naruse
d66b539d88 merge revision(s) 34391:
* ext/readline/readline.c (readline_attempted_completion_function):
	  respect encodings.  [Bug #5941]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 02:01:28 +00:00
naruse
36cfe460a0 merge revision(s) 34254,34256:
* ext/readline/readline.c (readline_attempted_completion_function):
	  empty completion result does not mean memory error.

	* ext/readline/readline.c (readline_attempted_completion_function):
	  fix compile error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 01:58:31 +00:00
naruse
381821deea merge revision(s) 34116:
* ext/readline/readline.c (readline_readline): check if outstream
	  is closed to get rid of a bug of readline 6.  [ruby-dev:45043]
	  [Bug #5803]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 01:55:01 +00:00
naruse
a9500bbccd merge revision(s) 33049:
* test/ruby/test_rubyoptions.rb (test_script_from_stdin): slave pty
	  should be manipulated because master pty may not be a tty on some
	  environment (e.g. Solaris). [Bug:#5222] [ruby-dev:44420]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 01:50:47 +00:00
naruse
b818c6e1db merge revision(s) 33762:
* test/ruby/test_sleep.rb (test_sleep_5sec): 0.1sec tolerance is too
	  small for busy environment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 00:48:02 +00:00
naruse
4e3c928997 merge revision(s) 33673:
* test/dbm/test_dbm.rb: split tests for read only database.

	* test/gdbm/test_gdbm.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 00:46:28 +00:00
naruse
79634569e4 merge revision(s) 34028,34030:
* error.c (name_err_mesg_to_str): clear rb_thread_t::errinfo when
	  ignore exception under rb_protect().

	* test/ruby/test_exception.rb (test_exception_in_name_error_to_str):
	  add a corresponding test.
	  ignore exception under rb_protect(). [ruby-core:41612] [Bug #5755]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-08 00:44:05 +00:00