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

23815 Коммитов

Автор SHA1 Сообщение Дата
nobu de7e116e82 * property.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:53:03 +00:00
mrkn dca0b41777 * ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
zero or negative precision is error.  fixes #5098.
  [ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
  change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:49:47 +00:00
mrkn 079fb8d4c3 * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified for
specifying precision.  fixes #5098.  [ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
  change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:48:25 +00:00
nobu 2fd6b26620 * property.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:48:16 +00:00
mrkn 2fcb91c74c * ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): added
for symmetry to BigDecimal() function with an Integer.
  fixes #5098.  [ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
  change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:46:42 +00:00
mrkn 5ba05758fe * ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added
for adapting other Numeric subclasses.  [ruby-dev:44245]
* test/bigdecimal/test_bigdecimal_util.rb: test for the above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:40:27 +00:00
svn a987000bbc * 2011-07-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:40:27 +00:00
mrkn a238140726 * 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/trunk@32674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 15:40:23 +00:00
shyouhei 710dc1afc0 * array.c: Fix typo. https://github.com/ruby/ruby/pull/36
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 14:37:09 +00:00
svn a18b03c96c * 2011-07-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 15:18:01 +00:00
mame da5b7f9229 * 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/trunk@32671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 15:17:56 +00:00
usa 71ff558ed0 * test/rake/test_rake_directory_task.rb (TestRakeDirectoryTask#
test_directory_win32): fixed wrong test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 14:40:19 +00:00
mame 9a27239558 * 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/trunk@32669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 14:29:28 +00:00
nahi f23ad92a95 * forgot to add a test fixture file in r32666.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 13:23:45 +00:00
nahi 2fff0f4f71 * 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/trunk@32666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 13:21:49 +00:00
nahi 0a9b952c6f * ext/openssl/lib/openssl.rb: End of transition period introduced by
[ruby-dev:38018]. From the next version of 1.9.3, you should use
    require "openssl"
  instead of
    require "openssl/ssl"
  and
    require "openssl/x509"


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 06:30:07 +00:00
nahi 8c30497aae * 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/trunk@32662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 04:49:26 +00:00
svn e80d1f8faf * 2011-07-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 04:30:06 +00:00
nahi 6c8a2fe247 * 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/trunk@32658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-25 04:30:02 +00:00
akr 29f354df63 * ext/socket/extconf.rb: refine the recvmsg test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-24 11:35:56 +00:00
akr 0283c3d0bb * ext/socket/extconf.rb: fix the recvmsg test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-24 11:04:11 +00:00
akr f5b9de7502 * 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/trunk@32655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 23:57:50 +00:00
drbrain 6b3ec75c7f * 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/trunk@32652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 16:05:19 +00:00
kosaki 1e52e56037 revert r32647. r32649 is better one.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 15:57:21 +00:00
kosaki e39294cac5 * 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/trunk@32647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 15:18:32 +00:00
svn 9eba5f65e2 * 2011-07-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 15:05:07 +00:00
nobu 4dc1a21809 * error.c (rb_name_error_str): new function to raise NameError
with the name string but not ID.
* object.c, proc.c, variable.c: more removal of inadvertent symbol
  creation.  [Feature #5079]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 15:05:03 +00:00
tadf a7c15b2617 method name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 12:49:06 +00:00
tadf f0fa1d7a5a * lib/cmath.rb: should return a real number if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 12:14:43 +00:00
naruse fe4ceb25b9 * 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/trunk@32642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 11:21:55 +00:00
tadf f99bed9330 * 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/trunk@32641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 11:17:00 +00:00
suke e845e35fa3 * 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/trunk@32640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 10:13:53 +00:00
naruse 65658ea0d4 * parse.y (rb_enc_symname_type): :$a!, @a! and so on are not
valid symbols, so they should be inspected with quotes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 10:03:30 +00:00
akr 2bcd502a71 * 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/trunk@32638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 08:13:37 +00:00
drbrain c93ed570a2 * test/rake*: Remove dependencies on flexmock and session gems.
[Ruby 1.9 - Bug #4987]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 05:38:50 +00:00
nobu 12d9be6b72 * parse.y (rb_check_id): take care of attrset ID created
implicitly by local ID.  [Bug #5084]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 03:19:07 +00:00
nobu d9242d5966 * parse.y (rb_check_id): conversion condition was inverse.
[Bug #5084]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-23 03:12:28 +00:00
svn a3f5a5952f * 2011-07-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 21:16:54 +00:00
naruse 93177c1e5c Fix r32622.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 21:16:50 +00:00
kosaki 201179fc2a fixed bug ref
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 13:01:12 +00:00
kosaki 5975e9e008 * 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/trunk@32628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 12:52:25 +00:00
naruse b5f91deee0 * 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/trunk@32622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 12:29:13 +00:00
nobu 34918aa832 * object.c (rb_mod_{const,cvar}_defined, rb_obj_ivar_defined):
avoid inadvertent symbol creation in reflection methods.  based
  on a patch by Jeremy Evans at [ruby-core:38367].  [Feature #5072]
* vm_method.c (rb_mod_method_defined)
  (rb_mod_{public,private,protected}_method_defined)
  (obj_respond_to): ditto.
* parse.y (rb_check_id): new function returns already interned ID
  or 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 12:06:42 +00:00
nobu c276b73804 * parse.y (rb_is_global_id, rb_is_attrset_id): add missing
predicates.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 11:44:53 +00:00
kazu b8a1e15ef1 * test/ruby/test_object.rb (TestObject#test_respond_to_missing):
2nd argument of respond_to_missing? is not optional.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 11:37:06 +00:00
nobu e0060732f1 * parse.y (rb_enc_symname2_p): get rid of potential out-of-bound
access.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 10:05:49 +00:00
nobu 256eae162c * vm_method.c (obj_respond_to): fix missing argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 09:33:41 +00:00
nobu fba1063c5f * tool/rbinstall.rb (strip_file): accept an array of path names.
* tool/rbinstall.rb (install): allow multiple path names.
  [ruby-core:38379]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 07:12:22 +00:00
drbrain a58c76cc20 * 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/trunk@32614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 04:58:10 +00:00
drbrain c1fa17c138 * 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/trunk@32612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 04:52:22 +00:00