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

3857 Коммитов

Автор SHA1 Сообщение Дата
naruse e29d58970b 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/trunk@32699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 05:21:33 +00:00
drbrain 55b81eb9e6 * 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/trunk@32697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 03:33:45 +00:00
nobu c553ee2db8 * test/ruby/test_symbol.rb (TestSymbol#test_inspect): workaround for
ruby-mode.el.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 02:04:39 +00:00
drbrain 035ef0a347 * lib/rubygems: Update to RubyGems 1.8.6.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 01:40:07 +00:00
emboss b9c485aa0d * 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/trunk@32690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 00:31:43 +00:00
nobu 8603c5934a * eval_error.c (rb_print_undef_str): new function to raise
NameError for undefined method.
* load.c (rb_mod_autoload_p), object.c (rb_mod_const_get),
  variable.c (rb_f_untrace_var, set_const_visibility), vm_method.c
  (rb_mod_{remove,undef,alias}_method, set_method_visibility):
  remove inadvertent symbol creation.  based on the first patch by
  Jeremy Evans at [ruby-core:38447].  [Feature #5089]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 16:05:35 +00:00
nobu 298349d03b * vm_method.c (obj_respond_to): fix the respond_to_missing? override
case.  based on the patch by Jeremy Evans at [ruby-core:38417].
  [Feature #5072]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-26 16:05:30 +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
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
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
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
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
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
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
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
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
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 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
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
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
emboss 84e835fe4a * 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/trunk@32604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-22 00:13:07 +00:00
marcandre 616cae1090 * lib/csv.rb: Do not modify CSV.generate's argument [ruby-core:38356]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-21 21:37:43 +00:00
mame 9752864b88 * 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/trunk@32597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-21 11:09:52 +00:00
naruse 2dfc9e1626 * 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/trunk@32593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-21 08:27:08 +00:00
naruse 4aa9e1ace0 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/trunk@32590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-20 15:20:14 +00:00
tenderlove dc22968239 * ext/psych/lib/psych.rb: define a new BadAlias error class.
* ext/psych/lib/psych/visitors/to_ruby.rb: raise an exception when
  deserializing an alias that does not exist.
* test/psych/test_merge_keys.rb: corresponding test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-18 04:38:37 +00:00
nobu e2fd80b3d3 * error.c (rb_check_trusted): new function to check an object is
trusted.
* struct.c (rb_struct_modify), time.c (time_modify): check by the
  above function to show proper class names.  [Bug #5036]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-17 07:26:45 +00:00
nobu 18f0a65018 * error.c (rb_warn_m): accept multiple args in like puts. rdoc
patch by Erik Price at [ruby-core:38119].  [Feature #5029]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-17 06:30:10 +00:00
nobu 1297cc615c * test/ruby/test_module.rb (TestModule#test_method_{undefined,removed}):
tests for method_undefined and method_removed.  Bug#5015

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-17 03:17:17 +00:00
emboss f8a538495e * 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/trunk@32563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-16 23:02:42 +00:00
kosaki 6270ce85ed * 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/trunk@32554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15 16:06:53 +00:00
nahi e56f2abe4b * 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/trunk@32546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-15 03:03:31 +00:00
nahi ab86f1cffb * 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/trunk@32537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-14 05:41:05 +00:00
kosaki 55b3bfbc4c * signal.c (reserved_signal_p): reverted a part of r32523.
chikanaga noticed trap(:CHLD) has some realworld usecase.
* test/ruby/test_signal.rb (TestSignal#test_reserved_signal):
  ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-12 11:04:58 +00:00
kosaki 89e2951bde * signal.c (sig_trap): don't permit to change a signal handler which
the interpreter reserved.
* signal.c (reserved_signal_p): ditto.
  [Bug #2616] [ruby-core:27625]

* test/ruby/test_signal.rb (TestSignal#test_reserved_signal):
  added a test for reserved signal.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-12 04:55:50 +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 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
sorah 7506a580fe * lib/test/unit.rb: Add new class variable `@@testfile_prefix`.
This is for changing test name prefix. (For testing)

* test/testunit/tests_for_parallel/ptest_first.rb: Renamed from
  test_first.rb

* test/testunit/tests_for_parallel/ptest_second.rb: Renamed from
  test_second.rb

* test/testunit/tests_for_parallel/ptest_third.rb: Renamed from
  test_third.rb

* test/testunit/tests_for_parallel/ptest_forth.rb: Renamed from
  test_forth.rb

* test/testunit/tests_for_parallel/runner.rb: Remove misc.rb

* test/testunit/tests_for_parallel/ptest_first.rb: ditto.

* test/testunit/tests_for_parallel/ptest_second.rb: ditto.

* test/testunit/tests_for_parallel/ptest_third.rb: ditto.

* test/testunit/tests_for_parallel/ptest_forth.rb: ditto.

* test/testunit/tests_for_parallel/misc.rb: Removed because no longer
  needed.

* test/testunit/test_parallel.rb: Fix assertions for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 12:19:16 +00:00
naruse a2e497d5ed * ext/json: Merge json gem 1.5.4+ (f7f78896607b6f6226cd).
[Bug #4700]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 08:01:04 +00:00
mrkn ebd61e5f28 * ext/bigdecimal/bigdecimal.c (BigDecimal_power): support non-integral
exponent.  fixes #3271
* ext/bigdecimal/bigdecimal.c (rmpd_power_by_big_decimal): ditto.
* ext/bigdecimal/bigdecimal.c (BigDecimal_power_op): add a function to
  only use for "**" operator.
* test/bigdecimal/test_bigdecimal.rb: add a bunch of tests for the
  above changes.
* ext/bigdecimal/bigdecimal.c (is_integer): add an utility function.
* ext/bigdecimal/bigdecimal.c (is_negative): ditto.
* ext/bigdecimal/bigdecimal.c (is_positive): ditto.
* ext/bigdecimal/bigdecimal.c (is_zero): ditto.
* ext/bigdecimal/bigdecimal.c (is_one): ditto.
* ext/bigdecimal/bigdecimal.c (is_even): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 03:19:49 +00:00
tarui d22e08f937 * range.c (range_max): fix behavior with excluded end value.
[Bug #4591]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 00:47:31 +00:00
xibbar 7fd78fad3e * lib/cgi/core.rb: fix multipart form parsing bug. [Bug #3866]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-09 05:32:19 +00:00
nobu dd2dfc71e7 * common.mk (RUN_OPT): disable gems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 23:39:42 +00:00
nobu 4902ef7d59 * ext/json/parser/parser.rl (convert_encoding): should not modify
the argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-08 07:40:41 +00:00
usa 1a1c95404f * test/testunit/test_parallel.rb (TestParallelWorker#teardown): wait
the child process even if the communition pipe is broken.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-07 08:56:12 +00:00
nobu cfa0035962 * encoding.c (rb_enc_set_index, rb_enc_associate_index): should
check if frozen.
* parse.y (rb_intern3), ruby.c (process_options, ruby_script):
  defer freezing after associating encodings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-07 06:44:46 +00:00