Commit graph

5576 commits

Author SHA1 Message Date
nagachika
cdac7f430d merge revision(s) 39277:
* test/ruby/test_thread.rb: fixed typo
	  patched by Hiroki Matsue via https://github.com/ruby/ruby/pull/248


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-02 17:39:26 +00:00
nagachika
e8237c5b32 merge revision(s) 39236: [Backport #7841]
* class.c (include_modules_at): detect cyclic prepend with original
	  method table.  [ruby-core:52205] [Bug #7841]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-02 17:24:30 +00:00
nagachika
362f70c3cf merge revision(s) 39234,39235: [Backport #7843]
* vm_method.c: call method_removed hook on called class, not on
	  prepending iclass.
	  prepending iclass.  [ruby-core:52207] [Bug #7843]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-02 17:17:59 +00:00
nagachika
77f603cbc9 merge revision(s) 39179,39245: [Backport #7826]
the process maybe already finished
	* test/ruby/test_process.rb (test_setsid): Added a workaround for
	  MacOS X. Patch by nagachika. [Bug #7826] [ruby-core:52126]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-26 15:22:53 +00:00
drbrain
faa9fb59e3 Merge trunk revision: 39463
* lib/net/http.rb:  Removed duplicate Accept-Encoding in Net::HTTP#get.
  [ruby-trunk - Bug #7924]
* test/net/http/test_http.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 06:19:29 +00:00
drbrain
9f9c04262a Merge trunk revision: 39366
* lib/rubygems/installer.rb (build_extensions):  Create extension
  install destination before building extension.  Patch by Kenta Murata.
  [ruby-trunk - Bug #7897]
* test/rubygems/test_gem_installer.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 21:09:09 +00:00
usa
11d79c680f merge revision(s) 39384:
* lib/rexml/document.rb (REXML::Document.entity_expansion_text_limit):
	  new attribute to read/write entity expansion text limit.  the default
	  limit is 10Kb.

	* lib/rexml/text.rb (REXML::Text.unnormalize): check above attribute.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 10:22:20 +00:00
drbrain
79db75dc4e Merge trunk revision: 39327
* lib/rubygems/commands/update_command.rb:  Create the installer after
  options are processed.  [ruby-trunk - Bug #7779]
* test/rubygems/test_gem_commands_update_command.rb:  Test for the
  above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-20 20:07:57 +00:00
drbrain
0558cc5272 Merge revision 39292:
* compar.c (rb_invcmp): compare by inversed comarison, with preventing
  from infinite recursion.  [ruby-core:52305] [Bug #7870]

* string.c (rb_str_cmp_m), time.c (time_cmp): get rid of infinite
  recursion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-19 23:57:11 +00:00
drbrain
ccd431e2e0 * backport r39307 from trunk. [Bug #7880]
* lib/rubygems/installer.rb:  Fixed placement of executables with
  --user-install.  [ruby-trunk - Bug #7779]

* test/rubygems/test_gem_installer.rb:  Test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-19 05:09:18 +00:00
nobu
fc23f8c695 merge revision(s) 39201,39202:
* win32/Makefile.sub (config.status): site and vendor directories
	  should use sitearch, not arch.  [ruby-dev:46964] [Bug #7823]

	* configure.in (rubysitearchprefix): sitearchdir and vendorarchdir
	  should use sitearch, not arch.  [ruby-dev:46964] [Bug #7823]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-19 03:25:48 +00:00
ko1
885f2da83b * backport r39275 from trunk. [ruby-dev:46994] [Bug #7774]
* proc.c (rb_binding_new_with_cfp): create binding object even if
  the frame is IFUNC. But return a ruby-level binding to keep
  compatibility.
  This patch fix degradation introduced from r39067.
  [Bug #7774] [ruby-dev:46960]
* test/ruby/test_settracefunc.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-18 23:12:25 +00:00
ktsj
cd391985a1 * backport r39276 from trunk. [ruby-dev:46997] [Bug #7825]
* vm.c (rb_thread_mark): mark a working Proc of bmethod
  (a method defined by define_method) even if the method was removed.
  We could not trace working Proc object which represents the body
  of bmethod if the method was removed (alias/undef/overridden).
  Simply, it was mark miss.
  This patch by Kazuki Tsujimoto. [Bug #7825]

  NOTE: We can brush up this marking because we do not need to mark
  `me' on each living control frame. We need to mark `me's
  only if `me' was free'ed. This is future work after Ruby 2.0.0.

* test/ruby/test_method.rb: add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 11:45:27 +00:00
naruse
ddddf044b2 merge revision(s) 39232,39233,39238: [Backport #7831][Backport #7852]
* lib/net/http:  Do not handle Content-Encoding when the user sets
	  Accept-Encoding.  This allows users to handle Content-Encoding for
	  themselves.  This restores backwards-compatibility with Ruby 1.x.

	* lib/net/http/generic_request.rb:  ditto.

	* lib/net/http/response.rb:  ditto

	* test/net/http/test_http.rb:  Test for the above.

	* test/net/http/test_http_request.rb:  ditto.

	* test/net/http/test_httpresponse.rb:  ditto.
	  [ruby-trunk - Bug #7831]

	* lib/net/http.rb:  Removed OpenSSL dependency from Net::HTTP.

	* test/net/http/test_http.rb:  Remove Zlib dependency from tests.

	* test/net/http/test_http_request.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-14 15:51:45 +00:00
drbrain
e256dca8b2 * Backport r39213 from trunk [ruby-trunk - Bug #7383]
* lib/rubygems.rb:  Return BINARY strings from Gem.gzip and Gem.gunzip.
  Fixes intermittent test failures.  RubyGems issue #450 by Jeremey
  Kemper.
* test/rubygems/test_gem.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 22:07:59 +00:00
drbrain
ceff56c7f0 * Backport part of r39166 from trunk [ruby-trunk - Bug #7809]
* lib/rubygems/package.rb:  Include checksums.yaml.gz signatures for
  verification.
* test/rubygems/test_gem_package.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 22:02:42 +00:00
naruse
0b0316f3c1 merge revision(s) 39210:
Suppress warnings: setting Encoding.default_external

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 06:35:56 +00:00
naruse
4f05e726f6 merge revision(s) 39209:
Get libc's path by ldd [Bug #7828] [ruby-core:52129]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 06:35:19 +00:00
naruse
b7b9aa6609 merge revision(s) 39208:
* ext/json: merge JSON 1.7.7.
	  This includes security fix. [CVE-2013-0269]
	  d0a62f3ced
	  https://groups.google.com/d/topic/rubyonrails-security/4_YvCpLzL58/discussion


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-13 06:34:48 +00:00
usa
450a515e95 * array.c (rb_ary_dup): reverted r39004. see [Bug #7768], and the
release manager finailly decided to revert it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 10:58:35 +00:00
nobu
98932f5150 eval.c: preserve errinfo
* eval.c (rb_ensure): preserve errinfo accross ensure proc before
  JUMP_TAG().  [ruby-core:52022] [Bug #7802]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 07:09:48 +00:00
nobu
49c5a3da6f envutil.rb: check termsig
* test/ruby/envutil.rb (assert_separately): check also terminating
  signal not only if core dumped.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 07:08:32 +00:00
drbrain
70fc27b7fa * lib/rdoc/generator/darkfish.rb: Set encoding on output template to
user-specified encoding.
* test/rdoc/test_rdoc_generator_darkfish.rb:  Test for above.

* lib/rdoc.rb:  Bump version


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 04:12:56 +00:00
drbrain
d2be12ef61 * lib/rubygems/security/policy.rb: Raise proper exceptions when
verifying unsigned gems (instead of crashing).
* test/rubygems/test_gem_security_policy.rb:  Tests for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 02:58:19 +00:00
drbrain
c5d1d12977 * test/rubygems/test_gem_dependency_installer.rb: Improve coverage of
--install-dir feature of gem install.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08 01:58:59 +00:00
tenderlove
1c836f811c * ext/psych/lib/psych/visitors/yaml_tree.rb: fixing string quotation
when dumping Ruby strings. Thanks Ingy

* test/psych/test_psych.rb: appropriate tests.

* test/psych/test_yaml.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 23:54:29 +00:00
drbrain
a75922010f * lib/rubygems/package/old.rb: Disallow installation of old-format
gems when a security policy is active.
	* test/rubygems/test_gem_package_old.rb:  Test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 22:48:35 +00:00
drbrain
bab42629eb * lib/rubygems/dependency_installer.rb: Only install local gems if
they end in '.gem'.  Fixes github rubygems issue #407.
* test/rubygems/test_gem_dependency_installer.rb:  Test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 22:17:08 +00:00
usa
7d2725493e * test/rubygems/test_gem_config_file.rb
(TestGemConfigFile#test_check_credentials_permissions): skip on
  Windows. see [Bug #7784] [ruby-core:51864] and r39070.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 12:11:19 +00:00
nobu
13b11810e2 mkmf.rb: fix merge_libs
* lib/mkmf.rb (MakeMakefile#merge_libs): insert following reversal
  ordered elements just after the duplicated element, not overwriting
  successive elements.  [ruby-core:50314] [Bug #7467]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 06:33:22 +00:00
nobu
fd0c338df7 test_libs.rb: new test
* test/mkmf/test_libs.rb (TestMkmf:TestLibs): tests for $libs operations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 06:32:12 +00:00
drbrain
c27fd33319 * lib/rubygems/package.rb: Ensure digests are generated for signing.
* test/rubygems/test_gem_package.rb:  Test for the above.

	* lib/rubygems/security/policy.rb:  Ensure digests are present when
	  verifying a gem and match the number of signatures bidirectionally.
	* test/rubygems/test_gem_security_policy.rb:  Test for the above.

	* lib/rubygems.rb:  Documentation improvements (by zzak)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 05:56:53 +00:00
nobu
38f04d8231 test_basicinstructions.rb: fix typo
* test/ruby/test_basicinstructions.rb (test_send_opassign): fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 01:20:39 +00:00
nobu
46761cdb98 test_basicinstructions.rb: implementation defined
* test/ruby/test_basicinstructions.rb (test_send_opassign):
  implementation defined behavior.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 01:07:22 +00:00
nobu
cbb86ec6fe test_basicinstructions.rb: fix typo
* test/ruby/test_basicinstructions.rb (test_send_opassign): fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07 01:05:50 +00:00
marcandre
6851ad4756 * vm_insnhelper.c: attr_writer should return its argument [Bug #7773]
* test/ruby/test_basicinstructions.rb: Test for above

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 17:31:22 +00:00
kosaki
6cd1e11d01 * test/ruby/test_process.rb (test_setsid): ensure to call
Process.wait(). Reported by George Koehler. Thanks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 06:37:28 +00:00
kosaki
88903e23dd * test/ruby/test_process.rb (test_setsid): skip when platform is
OpenBSD. Contributed from George Koehler.
  [Bug #7789] [ruby-core:51889]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 06:37:18 +00:00
nobu
5e9648be88 test_require.rb: shared drive
* test/ruby/test_require.rb (TestRequire#test_require_with_unc):
  cannot test unless the local drive is shared.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 02:17:23 +00:00
nobu
50cdfe2d51 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06 00:30:19 +00:00
jeg2
b614d7823c * lib/csv.rb: Remove the dangerous serialization feature.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 18:28:26 +00:00
ktsj
ca016c705f * vm.c (rb_vm_stack_to_heap): call rb_vm_get_binding_creatable_next_cfp
instead of rb_vm_get_ruby_level_next_cfp to prevent a segfault by
  calling Kernel#callcc. See r39067 for more details.
  [ruby-dev:46908] [ruby-trunk - Bug #7774]

* test/ruby/test_settracefunc.rb: add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 15:55:41 +00:00
drbrain
bd5efa7ff6 * lib/rdoc/servlet.rb: Fixed root search paths, filesystem paths
instead of HTTP paths were returned.
* test/rdoc/test_rdoc_servlet.rb:  Test for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 08:24:20 +00:00
nobu
a106b310e5 vm_method.c: drop include_all flag
* vm_method.c (rb_obj_respond_to): drop optional include_all flag if
  respond_to? method is defined in old style.  [Bug #7722]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 07:25:27 +00:00
ko1
88101695ab * proc.c (rb_binding_new_with_cfp): permit to create binding object
of IFUNC frame.
  When `rb_binding_new_with_cfp()' is called, VM finds out the first
  normal (has iseq) frame and create a binding object of this frame
  and create Env objects. `ep's of related frames are updated
  (`ep's point Env object managed spaces).
  However, `ep' of skipped IFUNC frame was not updated and
  old invalid `ep' was remained. It causes serious problems.
  To solve this issue, permit IFUNC to create binding.
  (Maybe there is no problem on it)
  [ruby-dev:46908] [ruby-trunk - Bug #7774]
* test/ruby/test_settracefunc.rb: add a test.
* vm.c (rb_vm_get_binding_creatable_next_cfp), vm_core.h: added.
* vm_trace.c: fix to use `rb_vm_get_binding_creatable_next_cfp()'.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 06:04:59 +00:00
marcandre
d22ce4a522 * numeric.c (fix_pow): Handle special cases when base is 0, -1 or +1
[Bug #5713] [Bug #5715]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 05:39:49 +00:00
marcandre
8797ebd662 * rational.c (nurat_expt): Deal with special cases for rationals 0, ±1
[bug #5713] [bug #5715]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 05:39:33 +00:00
nobu
55f0fa5a7a test_range.rb: refine message
* test/ruby/test_range.rb (TestRange#test_bsearch_with_mathn): refine
  failure messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 04:45:23 +00:00
nobu
490f1fc009 console.c: default by stty raw
* ext/io/console/console.c (rawmode_opt): use default values by `stty
  raw`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 04:27:57 +00:00
marcandre
e29e4b55ab * range.c: Use div instead of / for bsearch
* test/ruby/test_range.rb: Test showing bug when requiring mathn

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05 03:51:09 +00:00