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

27743 Коммитов

Автор SHA1 Сообщение Дата
nobu 5c677a83ba io.c: improved IO#reopen
* io.c (rb_io_reopen): improvement to accept optional arguments.
  a patch by Glass_saga (Masaki Matsushita) in [ruby-core:47806].
  [Feature #7103]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 02:43:19 +00:00
drbrain 48af304cf7 * ext/openssl/ossl_x509store.c (ossl_x509store_add_file): Added
documentation
* ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths):
  ditto
* ext/openssl/ossl_x509store.c (ossl_x509store_add_cert):  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 19:36:26 +00:00
svn a0ead9fca1 * 2012-10-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 17:25:21 +00:00
shugo a1ed68b931 * error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do not
taint messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 17:25:10 +00:00
svn a63bde6d91 * 2012-10-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 07:47:17 +00:00
nobu a416367b04 eval.c: hide internal hash
* eval.c (identity_hash_new): hide internal hashes for refinements.
* eval.c (rb_mod_refine): no default value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 07:47:11 +00:00
nagachika 39ef471e2d * ChangeLog: fix typos of r37064.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-01 14:52:53 +00:00
shugo e56eb1b163 * eval.c (identify_hash_new): new function to create a new identity
hash.

* eval.c (rb_overlay_module, rb_mod_using, rb_mod_refine): use
  identify_hash_new().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-01 13:56:37 +00:00
svn a0f43fad5e * 2012-10-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 17:36:14 +00:00
knu 1d695c36b9 * configure.in (--with-opt-dir): Make this also work on DLDFLAGS
so LIBRUBY_SO links fine with libexecinfo installed in a
  non-system directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 17:36:09 +00:00
mrkn 0d3cd4119e * vm_dump.c (rb_vm_bugreport): add /Library/Logs/DiagnosticReports
in the list of locations of crash reports.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 14:34:55 +00:00
nagachika 173aacf9ff * test/ruby/test_enumerator.rb (enum_test, test_inspect): remove unused
variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 12:32:04 +00:00
svn ab5545ee57 * 2012-09-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 12:20:15 +00:00
naruse 64989fa5a2 * string.c (rb_str_concat): use memcpy to copy a string which contains
NUL characters. [ruby-core:47751] [Bug #7090]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 12:20:09 +00:00
shirosaki 4d4800a5a7 envutil.rb: kill child process when timeout
* test/ruby/envutil.rb (EnvUtil#invoke_ruby): kill child process
  before Timeout::Error is raised. rmdir of mktmpdir fails with
  EACCES if child process is alive on Windows.

* test/thread/test_queue.rb (TestQueue): increase timeout.
  This test takes long time on Windows XP.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29 11:19:11 +00:00
shirosaki e453cc71a8 test_http.rb: clear environment variables
* test/net/http/test_http.rb (TestNetHTTP#test_proxy_address):
  clear environment variables. If http_proxy environment variable was
  set, the test failed.

* test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29 11:19:06 +00:00
shirosaki d0df0547c6 drbtest.rb: use :KILL on Windows
* test/drb/drbtest.rb (DRbCore#teardown):
  Use Process.kill :KILL on Windows because Process.kill :INT silently
  fails on Windows 7 and raises EINVAL on Windows XP for spawned
  process with new_pgroup: false.

* test/drb/drbtest.rb (DRbAry#teardown): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29 11:19:02 +00:00
shirosaki 6d1220b013 test_unicode_escape.rb: set script encoding
* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
  set script encoding to work with LANG=C. It would work on both
  Windows and Unix. Refix of r37051.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29 11:18:57 +00:00
shugo 0954607864 * vm_insnhelper.c (rb_vm_using_modules): use using_modules before
klass to fix method lookup order, and use klass even if klass is
  not a module to make refinements in class_eval invoked on classes
  work.

* eval.c (rb_using_module): accept a class as the second argument.

* eval.c (rb_mod_using, f_using): raise a TypeError if the argument
  is not a module.

* test/ruby/test_refinement.rb: add new tests for the above changes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29 02:21:27 +00:00
svn 039e2a35c2 * 2012-09-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 17:32:12 +00:00
shirosaki 93731ef211 * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
Use ruby only on Windows since the test fails on Unix with LANG=C.
  [ruby-core:47709] [Bug #7076]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 17:32:06 +00:00
shirosaki b5de8fcd81 test_unicode_escape.rb: fix test for Windows
* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
  echo command doesn't work properly against non-ascii character on
  Windows with chcp 437. Instead we use ruby.
  [ruby-core:47709] [Bug #7076]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 13:43:06 +00:00
ko1 2adb9fd4a5 * vm_insnhelper.c (vm_setup_method): refactoring.
Remove src_argc and use iseq->arg_size directly.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 08:58:22 +00:00
naruse 948169c5be * lib/rubygems/installer.rb (check_that_user_bin_dir_is_in_path):
test_generate_bin_bindir_with_user_install_warning(TestGemInstaller)
  fails on Windows with msys bash. It makes comparing paths
  case-insensitive.
  pick from upstream to fix a failure of test-all [ruby-core:47711]
  c474edb2f3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 08:29:21 +00:00
nobu 82491a4f73 vm_insnhelper.c: fix types
* vm_insnhelper.c (vm_setup_method): fix -Wshorten-64-to-32.

* vm_insnhelper.c (vm_base_ptr): fix -Wformat

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 08:11:27 +00:00
shugo de14055d62 * vm_method.c (search_method): copy refinement iclasses to search
superclasses correctly.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 06:48:20 +00:00
ko1 e3990633cb * insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.
* compile.c (iseq_compile_each): ditto.
* node.h: remove unused node `NODE_OPTBLOCK'.
* ext/objspace/objspace.c, gc.c (gc_mark_children): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 06:44:24 +00:00
ko1 64f5b6aedc * vm_core.h: now VM_DEBUG_BP_CHECK should be 1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 04:16:59 +00:00
ko1 d50483df23 * vm_core.h: remove rb_control_frame_t::bp (bp: base pointer).
`bp' can be calculate by `sp' (stack pointer) of previous frame.
  Now, `bp_check' field is remained for debug.  You can eliminate
  this field by setting  VM_DEBUG_BP_CHECK as 0.
* vm_insnhelper.c (vm_base_ptr): add `vm_base_ptr(cfp).
  This function calculates base pointer from cfp.
* vm_insnhelper.c (vm_setup_method): push `recv' value on top of
  value stack (before method parameters).
  This change is for keeping consistency with normal method dispatch.
* insns.def: fix to use vm_base_ptr().
* vm.c (vm_exec): ditto.
* vm_dump.c: remove `bp' related dumps.
* cont.c (fiber_init): fix to check VM_DEBUG_BP_CHECK.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 04:05:36 +00:00
svn 8124d67988 * 2012-09-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 01:41:01 +00:00
nobu 4a3c049cd1 io.c: IO#reopen int mode
* io.c (rb_io_reopen): accept File::Constants as well as mode string.
  based on the patch by Glass_saga (Masaki Matsushita) in
  [ruby-core:47694].  [Feature #7067]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 01:40:56 +00:00
shugo 8940e37210 * eval.c (rb_overlay_module, rb_mod_refine): accept a module as the
argument of Module#refine.

* vm_method.c (search_method): if klass is an iclass, lookup the
  original module of the iclass in omod in order to allow
  refinements of modules.

* test/ruby/test_refinement.rb: add tests for the above changes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-27 09:53:24 +00:00
knu e0bff65092 * ext/syslog/lib/syslog/logger.rb: add a formatter to the
Syslog::Logger object. [Bug #7065]
* test/syslog/test_syslog_logger.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-27 09:20:58 +00:00
svn 015af597e0 * 2012-09-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-27 02:36:41 +00:00
nobu 454d393555 eval.c: invariant IDs
* eval.c (rb_mod_include, rb_obj_extend): move invariant IDs to
  outside of loop.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-27 02:36:36 +00:00
ko1 1bebb22ce1 * insns.def: add new instruction `opt_empty_p' for optimize `empty?'
method.  Apply a patch proposed at [ruby-dev:46120]
  [ruby-trunk - Feature #6972] by Glass_saga (Masaki Matsushita).
* compile.c (iseq_specialized_instruction), vm.c, vm_insnhelper.h:
  ditto.
* id.c, template/id.h.tmpl: ditto.
* test/ruby/test_optimization.rb: test for this changes.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-26 09:34:46 +00:00
naruse 24793ac32d Revert "Darwin 12 (OS X Mountain Lion) also has Bug #6692"
This reverts commit r37033.
darwin12 seems to use an address started with fe80.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-26 04:03:26 +00:00
svn 8432fda6d7 * 2012-09-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-26 01:26:14 +00:00
naruse 6fc41b0291 Darwin 12 (OS X Mountain Lion) also has Bug #6692
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-26 01:26:09 +00:00
nobu 2301f983d2 test_gem_installer.rb: restore ARGV
* test/rubygems/test_gem_installer.rb
  (TestGemInstaller#test_install_creates_binstub_that_dont_trust_encoding):
  restore ARGV properly, non-ascii strings in different encodings are
  not equal.  [ruby-core:45975] [Bug #6673]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-25 02:14:18 +00:00
nobu 26df05b2f8 test_super.rb: super from BEGIN
* test/ruby/test_super.rb (TestSuper#test_super_in_BEGIN):
  for BEGIN.  [ruby-core:47680] [Bug #7064]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-25 01:10:32 +00:00
nobu 1e56548995 insns.def: super from at_exit
* insns.def (invokesuper): klass in cfp is not valid in at_exit and
  END blocks.  [ruby-core:47680] [Bug #7064]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-25 00:59:29 +00:00
svn 80440ed07f * 2012-09-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-24 23:18:04 +00:00
naruse 2eadff346a * iseq.c (rb_iseq_defined_string): the index of defined_strings must
be the value of type - 1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-24 23:17:59 +00:00
naruse 418bbce88a use assert_predicate for unary operator
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-24 12:10:51 +00:00
nobu 2314b80d4c Feature #7035
* compile.c (defined_expr), insns.def (defined): share single frozen
  strings.  [EXPERIMENTAL] [ruby-core:47558][Feature #7035]
* iseq.c (rb_iseq_defined_string): make expression strings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-24 08:36:53 +00:00
naruse 8ac52a95d5 * tool/merger.rb: add --ticket option to add ticket number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-24 02:23:48 +00:00
nobu a7353f6924 enum.c: id_call
* enum.c (enum_find): use id_call.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-24 01:18:22 +00:00
svn 96e4afdb02 * 2012-09-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-24 01:16:40 +00:00
nobu 8a3856dc1e enum.c: id_call
* enum.c (id_call): intern first and share.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-24 01:16:36 +00:00