Commit graph

3995 commits

Author SHA1 Message Date
yugui
921aed7778 merges r33201 from trunk into ruby_1_9_3.
--
* encoding.c (load_encoding): predefined encoding names are safe.
  [ruby-dev:44469] [Bug #5279]
* transcode.c (load_transcoder_entry): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-11 10:56:54 +00:00
kosaki
69cc900f52 merge revision(s) 33171:
* io.c (argf_next_argv): open in default text mode.
	  [ruby-core:39234] [Bug #5268]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-07 14:43:10 +00:00
naruse
f37162c06f merge revision(s) 33189:
* test/rubygems/test_gem_security.rb
	  (test_class_build_self_signed_cert): reset opt[:trust_dir] to apply
	  temporary Gem.user_home.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-05 06:07:01 +00:00
ktsj
85ead55c91 * backport r33177 from trunk.
* test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):
  add a test. Unlike TestThread#test_no_valid_cfp,
  this test succeeds even if win32ole is required (see r33153).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-03 16:02:22 +00:00
nobu
8e1b2f660c * test/ruby/test_encoding.rb (test_find): mingw is not Unix, of course.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-03 04:49:43 +00:00
nobu
c526a584c8 * vm_insnhelper.c (vm_search_const_defined_class): search
ancestors only when global scope.  [ruby-core:39227] [Bug #5264]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-02 05:36:49 +00:00
nobu
fcc41855e7 * parse.y (parser_tokadd_string, parser_yylex): ignore a backslash
which prefixes an non-ascii character, which has no escape
  syntax.  [ruby-core:39222] [Ruby 1.9 - Bug #5262]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-02 00:58:10 +00:00
nobu
0f0db4163d * insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): see
also inherited constants for classes without superclass and
  modules.  [ruby-core:37698] [Bug #3423]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-01 08:31:24 +00:00
usa
e0cde13a3c backported r33153 from trunk.
* test/ruby/test_thread.rb (TestThread#test_no_valid_cfp): skip when
  win32ole is required.  in such case, win32ole redefines
  Thread#initialize, and the block argument becomes to be not the top
  of the thread, then this testcase always fails.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-01 05:12:02 +00:00
naruse
b40ff978ee merge revision(s) 33148:
------------------------------------------------------------------------
r33148 | naruse | 2011-09-01 09:23:20 +0900 (Thu, 01 Sep 2011) | 1 line

Remove tests of json/add/{complex, rational}.
------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-01 00:25:52 +00:00
naruse
c9de257866 merge revision(s) 33142:
* ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-31 07:02:52 +00:00
kosaki
c45ad62966 merge revision(s) 33131:
* 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/branches/ruby_1_9_3@33136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30 20:28:31 +00:00
kosaki
c8473b46ae merge revision(s) 33130:
* 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/branches/ruby_1_9_3@33135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30 20:28:10 +00:00
naruse
510f6dc7d0 merge revision(s) 33122:
* ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).
	  [Bug #5173] [ruby-core:38866]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30 02:25:32 +00:00
kosaki
4e9438bc91 * backport r33117 from trunk.
* 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/branches/ruby_1_9_3@33119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-30 00:53:44 +00:00
ryan
344849694a backported 33102 from trunk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-27 20:37:05 +00:00
drbrain
f5c8aecebc * backport r33074 from trunk
* lib/rubygems:  Update to RubyGems 1.8.10.  Fixes security issue in
  creating ruby-format gemspecs.  Fixes Gem.dir not being at the front
  of Gem.path to fix uninstall and cleanup commands.  Fixes gem
  uninstall stopping on the first missing gem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26 01:12:57 +00:00
sorah
ceb94d9888 * backport r33045 from trunk.
* insns.def (defined): fix to checking class variable.
  A patch by Magnus Holm <judofyr@gmail.com>.  Thanks!

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-25 04:13:53 +00:00
tenderlove
497e61ccba * ext/psych/lib/psych/nodes/node.rb: default to_yaml encoding to be
UTF-8.
* test/psych/test_encoding.rb: test yaml dump encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24 21:18:44 +00:00
drbrain
6b8fe957ed * backport r33043 from trunk.
* lib/rdoc:  Update to RDoc 3.9.3.  Fixes RDoc with `ruby -Ku`.  Allows
  HTTPS image paths to be turned into <img> tags.  Prevents special
  markup inside <tt> from being processed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24 00:02:17 +00:00
ryan
0ed77bc70f backported r33039
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23 23:05:34 +00:00
drbrain
e5f7bf8442 * backport r32981 and r32982 from trunk.
* ext/dl:  Add documentation.  Patch by Vincent Batts.
  [Ruby 1.9 - Bug #5192]
* ext/.document (fiddle):  Remove duplicate entry
* ext/fiddle:  Complete documentation of Fiddle.  Patch by Vincent
  Batts.  [#5192]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23 23:04:38 +00:00
ryan
1891188830 backport of 33036
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23 21:55:38 +00:00
nahi
91d6e312f5 * backport r33023 from trunk.
* ext/zlib/zlib.c (gzfile_read_header): Ensure that each section of
  gzip header is readable to avoid SEGV.

* test/zlib/test_zlib.rb (test_corrupted_header): Test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23 06:16:16 +00:00
ktsj
aef5decf8b * backport r33013 from trunk.
* iseq.c (iseq_s_disasm): fix a bug that may cause SEGV.

* test/ruby/test_method.rb (test_body): add a test for the above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-20 04:31:20 +00:00
nobu
aade9453c8 * ext/stringio/stringio.c (strio_read): return new string if nil
is explicitly given as a buffer ([Bug #5207]), otherwise set the
  encoding.  also removed dead code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-20 01:43:26 +00:00
shugo
f23e93f8b3 * backport r33007 from trunk.
* lib/net/imap.rb (idle): raises a Net::IMAP::Error when the
  connection is closed.  based on the patch by Hugo Barauna.
  [Bug #5190] [ruby-core:38930]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-19 05:18:20 +00:00
shugo
b824aff1ae * backport r33001 from trunk.
* lib/net/imap.rb (msg_att): accepts extra space before ')'.
  based on the patch by art lussos.  [Bug #5163] [ruby-core:38820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@33003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-19 02:39:34 +00:00
mrkn
bc6c037f84 Merge commit r32996 from trunk:
* ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal):
      add a new function for raising error when an object cannot coerce
      into BigDecimal.  [Bug #5172]
    * ext/bigdecimal/bigdecimal.c (BigDecimalValueWithPrec): use
      cannot_be_coerced_into_BigDecimal function.
    * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.
    * ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto.
    * test/bigdecimal/test_bigdecimal.rb: test for the avobe changes.
    * test/bigdecimal/testbase.rb (under_gc_stress): add a new utility
      method to run tests under the condition of GC.stress = true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-17 06:52:00 +00:00
mrkn
559b717567 Merge commit r32994 from trunk:
* rational.c (nurat_coerce): Rational#coerce should converts itself
      into Complex if the argument is a Complex with non-zero imaginary
      part.  [Bug #5020] [ruby-dev:44088]
    * test/ruby/test_rational.rb (test_coerce): test for the above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-17 01:32:16 +00:00
emboss
b3ed3c9ed1 * backport r32973 from trunk.
* ext/openssl/ossl_ssl.c: Support disabling OpenSSL compression.
* test/openssl/test_ssl.rb: Add a test for it.
  Thanks to Eric Wong for the patch.
  [Ruby 1.9 - Feature #5183] [ruby-core:38911]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-15 01:20:27 +00:00
tadf
1bbb318938 * test/date/test_*.rb: added tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-13 00:42:27 +00:00
tenderlove
6e5aa36709 * ext/psych/lib/psych/core_ext.rb: Make Kernel#y private.
[ruby-core:38913]
* test/psych/test_yaml.rb: corresponding test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-13 00:29:56 +00:00
shugo
f988bf17bb * backport r32856 from trunk.
* lib/xmlrpc/client.rb, lib/xmlrpc/server.rb: should use
  String#bytesize instead of String#size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-12 08:06:49 +00:00
drbrain
ba6e227350 * lib/rake: Update to Rake 0.9.2.2. Prevent pollution of toplevel
namespace by Commands.  Remove unused variable and debugging
  statement in tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-12 03:29:02 +00:00
drbrain
a750006eda * backport r32935 from trunk
* lib/rdoc:  Import RDoc 3.9.2.  Fixes TIDYLINK for HTML output.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-11 18:44:10 +00:00
mrkn
d72d87cd2d Merge the commit r32903:
* complex.c (nucomp_rationalize): calls rationalize of real part if
      imaginary part is exactly zero.  The patch is made by Marc-Andre
      Lafortune.  fixes [Bug #5178] [ruby-core:38885]
    * test/ruby/test_complex.rb (test_rationalize): add a test for the
      above change.
    * complex.c (nucomp_to_r): fix RDoc comment.  The patch is made by
      Marc-Andre Lafortune.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-10 10:40:21 +00:00
ngoto
e2ff2dfec5 * test/fiddle/helper.rb (libc_so, libm_so): Solaris support added.
* test/dl/test_base.rb (libc_so, libm_so): on Solaris, remove libc
  and libm version numbers for detecting default libc and libm.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-09 03:36:18 +00:00
kosaki
cf4207a7ad merge revision(s) 32859:
* test/test_syslog.rb (TestSyslog#test_log): Do not be too
	  specific about the log line format.  Fixes #5081.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-07 15:11:03 +00:00
kosaki
4a5a6f4a2c merge revision(s) 32885:
* time.c (rb_strftime_alloc): raise ERANGE if width is too large.
	  Patch by Nobuyoshi Nakada. [Bug #4457] [ruby-dev:43285]

	* test/ruby/test_time.rb (class TestTime): add a test for the
	  above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-07 14:40:07 +00:00
drbrain
ed93a37bd5 * lib/rdoc: Update to 3.9.1. Fixes === lines in verbatim sections.
Fixes :nodoc: on class aliases.  Fixes :stopdoc: creating references
	  to Object.  Fixes spacing when class comments are merged in ri.
	  Fixes `ri []` crash.  Fixes bug report URL when rdoc crashes.  Adds
	  :doc: and :nodoc: to allow hiding of implementation details in ruby.
	  Makes `rdoc` and `ri` gem-aware.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-05 21:21:55 +00:00
drbrain
e8ad0a3e1e * lib/rdoc: Update to 3.9.1. Fixes === lines in verbatim sections.
Fixes :nodoc: on class aliases.  Fixes :stopdoc: creating references
	  to Object.  Fixes spacing when class comments are merged in ri.
	  Fixes `ri []` crash.  Fixes bug report URL when rdoc crashes.  Adds
	  :doc: and :nodoc: to allow hiding of implementation details in ruby.
	  Makes `rdoc` and `ri` gem-aware.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-05 20:18:14 +00:00
luislavena
3ddef8e50c Backported r32804 from trunk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-04 22:39:35 +00:00
nobu
f28755df62 * test/io/console/test_io_console.rb (test_noctty): daemon() on
OpenBSD seems not to detach the controlling terminal, when the
  argument noclose is non-zero.  ref: [Bug #5135]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-04 22:00:36 +00:00
sorah
2fb749fed6 * test/testunit/test_parallel.rb: pass "--ruby" option to
test/testunit/tests_for_parallel/runner.rb. [Bug #5132] [ruby-dev:44303]
  Backported from trunk r32812.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-02 11:26:21 +00:00
nobu
0d6ef94111 * hash.c (recursive_hash): hash value of emptied hash should be
equal to an empty hash.  [ruby-core:38650]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-02 03:03:18 +00:00
nobu
ceb5e60c81 * parse.y (rb_enc_symname2_p): :! is valid symbol. [Bug #5136]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-02 02:42:17 +00:00
naruse
a781b40242 Revert r32803.
Do you know "code freeze"?
Anyway this breaks make rdoc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-02 02:39:36 +00:00
drbrain
8e627bc1f7 * lib/rdoc: Update to 3.9.1. Fixes === lines in verbatim sections.
Fixes :nodoc: on class aliases.  Fixes :stopdoc: creating references
	  to Object.  Fixes spacing when class comments are merged in ri.
	  Fixes `ri []` crash.  Fixes bug report URL when rdoc crashes.  Adds
	  :doc: and :nodoc: to allow hiding of implementation details in ruby.
	  Makes `rdoc` and `ri` gem-aware.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-01 18:57:36 +00:00
usa
c2c6dc8dfe * test/rake/test_rake_directory_task.rb (TestRakeDirectoryTask#
test_directory_win32): fixed wrong test.
  backported r32670 from trunk.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-01 18:27:45 +00:00