Commit graph

24190 commits

Author SHA1 Message Date
mrkn
608ac0b1cd * configure.in: change the default compiler to gcc-4.2 if target os
is OS X 10.7 (Lion).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 15:44:48 +00:00
kosaki
7e277e52b1 merge revision(s) 32647:
* configure.in: changed default optflags to -O0 if the compiler is
	  llvm-gcc. It prevent ruby crash on OS X 10.7 (Lion).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 15:19:38 +00:00
akr
5314b52068 * io.c (rb_update_max_fd): validate fd.
* ext/socket/rubysocket.h (rsock_discard_cmsg_resource): add
  msg_peek_p argument for the declaration.

* ext/socket/ancdata.c (discard_cmsg): add msg_peek_p argument.
  assume FreeBSD, NetBSD and MacOS X doesn't generate passed fd
  when MSG_PEEK. 
  (rsock_discard_cmsg_resource): add msg_peek_p argument.
  (bsock_recvmsg_internal): call rsock_discard_cmsg_resource with
  msg_peek_p argument.

* ext/socket/unixsocket.c (unix_recv_io): call
  rsock_discard_cmsg_resource with msg_peek_p argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 08:13:37 +00:00
drbrain
1a4df6863d * test/rake*: Remove dependencies on flexmock and session gems.
[Ruby 1.9 - Bug #4987]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 06:05:36 +00:00
naruse
6c2e145ee8 merge revision(s) 32631:
------------------------------------------------------------------------
r32631 | naruse | 2011-07-23 06:16:50 +0900 (Sat, 23 Jul 2011) | 1 line

Fix r32622.
------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 21:17:36 +00:00
kosaki
b44970a0b7 merge revision(s) 32628:
* vm_insnhelper.c (vm_call_cfunc): added volatile for a workaround
	  of cfp consistency error problem on OS X 10.7 (Lion). It's
	  suspected llvm optimization bug.
	  [Bug #5076] [ruby-dev:44185]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 12:53:42 +00:00
naruse
7ea6334d4c merge revision(s) 32622:
* lib/uri/generic.rb (WFKV_): unroll the loop of regexp.

	* lib/uri/generic.rb (URI.decode_www_form_component): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 12:50:22 +00:00
naruse
49995e8ed1 merge revision(s) 32595:
* enum.c (enum_inject): remove empty line to notify rdoc
	  Enumerable#reduce is alias. patched by milki@github.
	  https://github.com/ruby/ruby/pull/26


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 12:49:55 +00:00
naruse
11b4be8e07 merge revision(s) 32593:
* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#each):
	  Allow HTTP/0.9 request which doesn't has any header or body.
	  patched by Felix Jodoin. [ruby-core:38040] [Bug #5022]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 12:49:34 +00:00
naruse
e0a17f3b05 merge revision(s) 32590:
------------------------------------------------------------------------
r32590 | naruse | 2011-07-21 00:20:14 +0900 (Thu, 21 Jul 2011) | 7 lines

Add test for r32586.

FreeBSD (at least 7.2 to 7.2) calls nsdispatch(3) when it calls
getaddrinfo(3). And nsdispatch(3) doesn't call dlerror(3) even if
it calls _nss_cache_cycle_prevention_function with dlsym(3).
So our DL::Handle#sym must call dlerror(3) before call dlsym.
In general uses of dlerror(3) should call it before use it.
------------------------------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 12:49:11 +00:00
naruse
2b7e8f86e1 merge revision(s) 32586:
* ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()
	  before calling dlsym(). [ruby-dev:44091] [Bug #5021]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 12:45:32 +00:00
nobu
58a6a67923 * parse.y (rb_enc_symname2_p): get rid of potential out-of-bound
access.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 10:05:49 +00:00
nobu
05d7a284f1 * vm_method.c (obj_respond_to): fix missing argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 09:33:41 +00:00
drbrain
ee54fbd644 * lib/net/http.rb: Net::HTTP#finish is used to manually close
connections.  [Ruby 1.9 - Bug #5045]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 04:58:42 +00:00
drbrain
9fd68c53ca * ext/readline/readline.c: Add examples for Readline.completion_proc=.
[Ruby 1.9 - Bug #5057]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 04:54:09 +00:00
drbrain
cc5d4428cf * tool/rbinstall.rb (default gems): Install executables into the fake
gem dir for Gem.bin_path.  [Ruby 1.9 - Bug #4485]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 04:26:37 +00:00
emboss
df88c5af6d * backport r32609 from trunk.
* ext/openssl/ossl_hmac.c: Revert checking return type of
  HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 04:17:39 +00:00
emboss
48e712703c * backport r32606 from trunk.
* ext/openssl/ossl_digest.c: Check return value of EVP_DigestInit_ex.
* ext/openssl/ossl_hmac.c: Check return value of HMAC_Init_ex.
  Thanks, Jared Jennings, for the patch.
  [ Ruby 1.9 - Bug #4944 ] [ruby-core:37670]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 02:25:06 +00:00
emboss
ea74a92bed * backport r32604 from trunk.
* ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
* test/openssl/test_engine.rb: Add a test for it.
  Thanks to Ippei Obayashi for providing the patch.
  [ Ruby 1.9 - Bug #5062 ] [ruby-dev:44173]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 00:19:32 +00:00
svn
d9a7509b97 * 2011-07-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-21 21:40:24 +00:00
marcandre
01e1dcef9a * backport of r32600 from trunk
* lib/csv.rb: Do not modify CSV.generate's argument [ruby-core:38356]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-21 21:40:21 +00:00
mame
1d9cac36ea * backport r32597 from trunk.
* thread.c (set_trace_func, thread_set_trace_func_m): reset tracing
  state when set_trace_func hook is removed.  This is workaround patch
  to force to reset tracing state that is broken by continuation call.
  a patch from James M. Lawrence.  [Feature #4347] [ruby-core:34998]

* test/ruby/test_continuation.rb (class TestContinuation): add a test
  for above.  a patch from James M. Lawrence.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-21 12:12:53 +00:00
akr
f0353afdc1 * ext/socket/ancdata.c (discard_cmsg): workaround for MacOS X Lion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-21 12:02:45 +00:00
svn
ff4e38fb32 * 2011-07-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-20 22:12:04 +00:00
akr
fdcac09849 * backport r32579, r32581, r32587 by akr and r32588 by kazu.
r32579:

* io.c (rb_update_max_fd): new function.

* internal.h (rb_update_max_fd): declare rb_update_max_fd.

* thread_pthread.c (rb_thread_create_timer_thread): update max fd when
  timer thread pipe is created.

r32581:

* io.c (UPDATE_MAXFD): removed.

r32587:

* include/ruby/intern.h (rb_update_max_fd): declaration moved from
  internal.h.

* file.c: ditto.

* io.c: call rb_update_max_fd for each new fds.

* process.c: ditto.

* random.c: ditto.

* ruby.c: ditto.

* ext/io/console/console.c: ditto.

* ext/openssl/ossl_bio.c: ditto.

* ext/pty/pty.c: ditto.

* ext/socket/init.c: ditto.

* ext/socket/socket.c: ditto.

* ext/socket/ancdata.c: ditto.

* ext/socket/unixsocket.c: ditto.

r32588:

* io.c (rb_update_max_fd): remove parentheses. they are not in
  macro.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-20 22:11:56 +00:00
svn
ea6044ea36 * 2011-07-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-16 23:10:11 +00:00
emboss
6eecb43608 * backport r32563 from trunk
* test/openssl/test_ssl_session.rb: add PEM SSL session without TLS
  extensions. Use this as the default for the tests to ensure
  compatibility with OpenSSL 0.9.7.
  [ Ruby 1.9 - Bug #4961 ] [ruby-core:37726]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-16 23:10:08 +00:00
nobu
64b800383a * configure.in (RUBY_UNIVERSAL_ARCH): restore arch flag.
Bug #4977


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-16 08:29:21 +00:00
usa
f9e63da21b * win32/setup.mak: support to build x64-mswin64 on Windows7 (and Vista,
perhaps).
  backported r32521 from trunk


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-16 02:22:48 +00:00
marcandre
22120bcceb * Backport of r32559 from trunk
* lib/uri/common.rb (module): Remove optional parser argument to Kernel#URI
  [ruby-core:38061]

* lib/uri/generic.rb (module): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15 21:32:02 +00:00
kosaki
f11eb9bbba merge revision(s) 32554:
* time.c (time_dup): used rb_obj_class() instead of CLASS_OF().
	  The patch is made by Kazuki Tsujimoto. [Bug #5012] [ruby-dev:44071]

	* test/ruby/test_time.rb (TestTime#test_getlocal_dont_share_eigenclass):
	  added a new test for eigenclass of time object.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15 16:16:26 +00:00
mrkn
2cdfa81ac8 * bignum.c (bigsub_int): add RB_GC_GUARD. This patch is made by
Makoto Kishimoto.  fixes #4223 [ruby-dev:42907]

* bignum.c (bigadd_int): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15 11:27:24 +00:00
svn
22a0e9e9c3 * 2011-07-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15 03:05:26 +00:00
nahi
b03e3cc5bf * backport r32546 from trunk.
* ext/digest/sha2/sha2.c (SHA256_Update, SHA512_Update): avoid Bus
  Error caused by unalignment access on Sparc-Solaris (and possibly on
  other similar environment.) This patch just do memcpy always instead
  of checking architecture. I see no perf drop on my 64bit env. For
  more details, see #4320.

* test/digest/test_digest.rb: add test for unalignment access.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15 03:05:23 +00:00
svn
94ed480cdc * 2011-07-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-14 05:46:03 +00:00
nahi
bdd7cf158e * backport r32537 from trunk.
* ext/openssl/ossl.c (ossl_verify_cb): trap the exception from
  verify callback of SSLContext and X509Store and make the
  verification fail normally. Raising exception directly from callback
  causes orphan resouces in OpenSSL stack. Patched by Ippei Obayashi.
  See #4445.

* test/openssl/test_ssl.rb
  (test_exception_in_verify_callback_is_ignored): test it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-14 05:46:00 +00:00
svn
3fc759ae74 * 2011-07-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-12 23:22:52 +00:00
sorah
1335b154d2 * lib/test/unit.rb(Test::Unit::Options#process_args): Fix bug.
Fix process_args didn't return `@option` after r30939. Backported
  r32526 from trunk.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-12 23:22:49 +00:00
kanemoto
63046f3140 time.c: can't compile time.c on AIX due to missing declaration for
ffs(). It is declared in strings.h on AIX.
        backported r32518 from trunk.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-11 14:52:25 +00:00
kanemoto
25af5ee57f thread_pthread.c (get_stack): need to adjust stack addr for
[Bug #1813] on AIX. backported r32511 from trunk.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-11 14:49:36 +00:00
ryan
53ee1fb47b updated news for minitest
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-11 09:56:09 +00:00
usa
d7080856a4 * numeric.c (rb_num2ull): use FIX2LONG instead of FIX2ULONG. see
rb_num2ulong(). fixed the problem of ObjectSpace._id2ref of IL32LLP64
  platforms, introduced at r32433.
  backported r32512 from trunk.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-11 06:19:39 +00:00
svn
93b59e38a2 * 2011-07-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 15:41:26 +00:00
mrkn
be46eca880 * NEWS: describe the improvement of BigDecimal#power and BigDecimal#**.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 15:41:22 +00:00
yugui
5a3318c2eb * version.h: 1.9.3 is no longer trunk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 14:59:20 +00:00
yugui
c1183af575 reverted Module#mix -- r31873, r31917 and r31918.
--
    * class.c (rb_mix_module): implement Module#mix.
--
    * class.c (check_mix_method_i, do_mix_method_i): not mix methods
--
    * test/ruby/test_module.rb (TestModule#test_mix_const): test for

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 14:59:12 +00:00
yugui
80a01400db Release branch of Ruby 1.9.3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 14:06:48 +00:00
mrkn
99f8f14d89 * ext/bigdecimal/bigdecimal.c (rmpd_power_by_big_decimal): fix
precision treatment errors.
* test/bigdecimal/test_bigdecimal.rb: add tests for the above change.
  fix precision treatment errors.
* ext/bigdecimal/bigdecimal.c (BigDecimal_power): precision argument
  should be optional for its compatibility.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 14:05:07 +00:00
nobu
819c2418b1 * process.c (rb_exec_arg_addopt): fix preprocess condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 13:59:00 +00:00
nobu
577c03c713 * parse.y (var_ref): distinguish vcall from local variable
references.  based on a patch by Michael Edgar michael.j.edgar
  AT dartmouth.edu.  Bug #5002

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 13:38:17 +00:00