Commit graph

24190 commits

Author SHA1 Message Date
yugui
4982814640 Fixes a wrong part in the previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-31 11:30:10 +00:00
yugui
2e3be73787 * common.mk (ECHO1): ":" in a make variable replacement cause a syntax
error with /usr/ccs/bin/make on Solaris.  Uses $(NULLCMD) instead.

* configure.in (NULLCMD): new check.

* Makefile.in (NULLCMD): Reflects checking in configure.

* win32/Makefile.sub (NULLCMD): new assignment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-31 11:27:30 +00:00
ktsj
31013d0f11 * backport r32768 from trunk.
* vm.c: check if cfp is valid. [Bug #5083] [ruby-dev:44208]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-31 02:57:18 +00:00
svn
1c8fd01449 * 2011-07-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 16:26:42 +00:00
mrkn
729c4b0602 Merge commit r32762:
* test/bigdecimal/test_bigdecimal.rb (test_version): removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 16:26:38 +00:00
tadf
e613980e83 * lib/cmath.rb (cbrt): should return a real number if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 14:53:14 +00:00
tadf
266755a6ff * ext/date/date_core.c: an issue that is same as [ruby-dev:44071].
* ext/date/date_strftime.c: identical to [ruby-dev:44112].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 14:49:40 +00:00
nobu
92b9c6bb85 * defs/default_gems: separate from tool/rbinstall.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 14:19:11 +00:00
nobu
77ed5993fe * io.c (rb_io_each_byte): rbuf can be refreshed during yield.
[Bug #5119]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 14:14:46 +00:00
ngoto
875cea0266 * strftime.c (NEEDS): avoid SEGV due to integer overflow in sparc-solaris2.10
and i686-linux.  fix [Bug #4456] [ruby-dev:43284]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 13:41:45 +00:00
mrkn
086dd7508f Merge commit r32754:
* ext/bigdecimal/bigdecimal.c (BigDecimal_version): version 1.1.0.
    * ext/bigdecimal/bigdecimal.gemspec: turn into a default gem.
    * tool/rbinstall.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 05:39:35 +00:00
mrkn
70d89f2c16 * ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
revive zero and implicit precision support as a deprecated feature.
* test/bigdecimal/test_bigdecimal_util.rb: modify a test for the above
  change.
* NEWS: describes the above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 04:57:45 +00:00
kosaki
64270d3df2 merge revision(s) 32749:
* vm.c (th_init): preallocate alternative stack.
	  NoMemoryError is better than rb_bug, of course.
	  Patch by Eric Wong. [ruby-core:38572][ruby-core:38594].

	* signal.c (rb_register_sigaltstack): ditto.

	* vm_core.h: moved ALT_STACK_SIZE definition from signal.c.

	* vm.c (thread_free): use xfree() instead of free().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-30 01:58:21 +00:00
akr
32cfc7cefd * ext/socket/lib/socket.rb (udp_server_sockets): unused variable
removed.
  patch by Jeremy Evans.  [ruby-core:38600]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29 22:40:41 +00:00
nobu
6c346da70e * ChangeLog: remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29 15:21:48 +00:00
svn
81113042a4 * 2011-07-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29 15:01:33 +00:00
akr
8c29dd8520 * lib/securerandom.rb: call OpenSSL::Random.seed at the
SecureRandom.random_bytes call.
  based on the patch by Masahiro Tomita.  [ruby-dev:44270] 


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29 15:01:20 +00:00
akr
7a261bf317 * ext/socket/mkconstants.rb: fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29 11:52:28 +00:00
akr
bca74ae5ea * ext/socket/mkconstants.rb: use whitespaces as a separator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29 11:29:49 +00:00
akr
63d65bec18 * ext/socket/mkconstants.rb: add documents for constants.
patch by Eric Hodel.  [ruby-core:37853] [Bug #4989]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-29 10:03:25 +00:00
mame
e5054226b4 * backport r32671 from trunk.
* proc.c: pre-allocate the unlinked_method_entry_list_entry struct to
  avoid memory allocation during GC.  based on a patch from Eric Wong.
  [ruby-core:38498]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28 16:25:23 +00:00
mame
43e8a7a3eb * backport r32669 from trunk.
* proc.c (struct METHOD), gc.c (gc_marks), vm_method.c
  (rb_gc_mark_unlinked_live_method_entries): fix SEGV bug.
  rb_method_entry_t was free'd even when the method is still on the
  stack if it is BMETHOD (i.e., Method#call).  This is because
  rb_method_entry_t is embedded in struct METHOD.  This commit
  separates them and marks the live method entries.
  See [ruby-core:38449] in detail.  fix [Bug #5047] [ruby-core:38171]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28 15:50:00 +00:00
svn
264fdd7664 * 2011-07-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28 15:01:01 +00:00
nagachika
34c7aaa1cb merge revision 32725:
* ext/fiddle/closure.c (callback): use rb_ary_tmp_new() instead of
          xmalloc() to allocate an array for arguments of callback procedure,
          to prevent arguments from being swept by GC. [ruby-core:38546]
          [Bug #4929]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28 15:00:58 +00:00
nahi
be10ad2072 * backport r32723 from trunk.
* ext/openssl/ossl_cipher.c (ossl_cipher_initialize): Avoid possible
  SEGV from AES encryption/decryption. Processing data by
  Cipher#update without initializing key (meaningless usage of Cipher
  object since we don't offer a way to export a key) could cause SEGV.

  In OpenSSL, the EVP which has EVP_CIPH_RAND_KEY flag (such as DES3)
  allows uninitialized key, but other EVPs (such as AES) does not
  allow it. Calling EVP_CipherUpdate() without initializing key causes
  SEGV so we set the data filled with "\0" as the key by default. See
  #2768.

* test/openssl/test_cipher.rb: test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28 13:52:57 +00:00
naruse
02345202ca merge revision(s) 32715:
------------------------------------------------------------------------
r32715 | naruse | 2011-07-28 09:23:28 +0900 (Thu, 28 Jul 2011) | 1 line

See __APPLE__ for __syscall.
------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-28 00:33:14 +00:00
drbrain
e83748fd55 * lib/delegate.rb: Move file-level documentation to the appropriate
classes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 19:56:28 +00:00
naruse
f39ed9dcde merge revision(s) 32707:
* test/fileutils/test_fileutils.rb: add OpenBSD case.
	  patched by Jeremy Evans [ruby-core:38530] see #5097

	* test/ruby/test_process.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 15:33:56 +00:00
naruse
bed02ef531 merge revision(s) 32702:
* include/ruby/missing.h: define __syscall if the platform has
	  __syscall in the library but doesn't define it in headers
	  for example Mac OS X.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 08:59:51 +00:00
naruse
88b031a321 merge revision(s) 32699:
------------------------------------------------------------------------
r32699 | naruse | 2011-07-27 14:21:33 +0900 (Wed, 27 Jul 2011) | 4 lines

Use ::Syck explicitly.

lib/rubygems/requirement.rb defines YAML::Syck.
So explicitly specify the top level one.
------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 08:59:35 +00:00
drbrain
b727b2a45e * object.c: Add usage documentation for BasicObject. Based on patch
by Thomas Sawyer.  [Ruby 1.9 - Bug #5067]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 06:49:04 +00:00
drbrain
76325a8be6 * lib/rubygems/uninstaller.rb: Add missing require and update
messaging to avoid confusion with uninstall --format-executable.
	  [Ruby 1.9 - Bug #4062]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 03:42:40 +00:00
drbrain
284144838c * lib/rubygems: Update to RubyGems 1.8.6.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 02:04:03 +00:00
emboss
49caf55759 * backport r32690 from trunk.
* test/openssl/test_pkcs12.rb: Add test and intermediate certificates.
  [ Ruby 1.9 - Feature #3793 ] [ruby-core:32088]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 01:07:18 +00:00
nobu
8f5ca116dd * property.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 01:07:00 +00:00
mrkn
04749b1250 * NEWS: add changes of bigdecimal and bigdecimal/util.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 16:27:51 +00:00
mrkn
2621ba04cb Merge revisions 32676, 32677, 32679, 32680:
* ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
      zero or negative precision is error.  fixes #5098.
      [ruby-dev:44210]
    * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified for
      specifying precision.  fixes #5098.  [ruby-dev:44210]
    * ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): added
      for symmetry to BigDecimal() function with an Integer.
      fixes #5098.  [ruby-dev:44210]
    * ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added
      for adapting other Numeric subclasses.  [ruby-dev:44245]
    * test/bigdecimal/test_bigdecimal_util.rb: add tests for the above
      changes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 16:17:04 +00:00
svn
a3edf1a48e * 2011-07-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:54:42 +00:00
mrkn
1d0cef8f02 Merge revision 32674:
* bigdecimal/bigdecimal.c (VpDup) a new function for duplicating
      a BigDecimal.
    * bigdecimal/bigdecimal.c (BigDecimal_new): support generating a new
      BigDecimal from another BigDecimal using BigDecimal global function
      or constructor.  [ruby-dev:44245]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:54:38 +00:00
nahi
798355f6e3 * backport r32666 from trunk.
* lib/xmlrpc/client.rb: Fix possible HTTP header formatting failure by 
  'Basic' header. Long username caused the base64 String truncation in 
  HTTP header which is not allowed. See #5046.

* test/xmlrpc/test_webrick_server.rb: test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 13:25:27 +00:00
nahi
e68c897925 * ext/openssl/lib/openssl/{x509.rb,ssl.rb}: Add deprecation warning
for openssl/{x509,ssl} usage. Users should require "openssl" instead 
  of "openssl/ssl" and "openssl/x509". Start of transition period 
  introduced by [ruby-dev:38018].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 06:38:44 +00:00
nahi
8ca6536703 * backport r32662 from trunk.
* ext/openssl/lib/openssl/x509.rb: Cosmetic change: move definition
  introduced in r30152 to x509-internal.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 04:51:26 +00:00
svn
ca9f321901 * 2011-07-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 04:36:45 +00:00
nahi
b409d22e25 * backport r32658 from trunk.
* ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): Avoid randomly generated
  SSLError from SSLSocket just after invoking SSLSocket#close.
  OpenSSL's SSL_shutdown could try to send alert packet and it might
  set SSLerr(global error stack) as the result. It causes the next
  SSL read/write operation to fail by unrelated reason.

  By design, we're ignoring any error at SSL_shutdown() so we clear
  global error stack after SSL_shutdown is called. See #5039.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 04:36:42 +00:00
akr
80a7bca458 * ext/socket/extconf.rb: refine the recvmsg test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-24 11:35:56 +00:00
akr
046bab7130 * ext/socket/extconf.rb: fix the recvmsg test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-24 11:04:11 +00:00
akr
b6fd481c21 * ext/socket/extconf.rb: test recvmsg allocates file descriptors for
fd passing even with MSG_PEEK.

* ext/socket/ancdata.c: use the above test result.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 23:57:50 +00:00
drbrain
ab1102717b * lib/rubygems/specification.rb: Restore behavior of
Gem::Specification#loaded.  [Ruby 1.9 - Bug #5032]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 16:24:50 +00:00
naruse
301dfa19b0 merge revision(s) 32642:
* test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base
	  directory. Current directory is not the top source directory when
	  the building process runs on other than there.

	* test/rake/test_rake_rake_test_loader.rb: ditto.

	* test/rake/test_rake_task_argument_parsing.rb
	  (test_terminal_width_using_hardcoded_80): hardcoded 80 is used
	  when app.unix? is false.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 16:15:12 +00:00
kosaki
e1d542bc8b revert r32648. r32649 is better one.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 15:59:47 +00:00