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

27717 Коммитов

Автор SHA1 Сообщение Дата
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
nobu aed254f314 mkmf.rb: unspace
* lib/mkmf.rb (String#unspace): unescape with backslashes.  normal
  makes need to escape spaces with backslashes.  nmake is not the
  case.  [Bug #7036]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-23 12:52:01 +00:00
nobu ba3d600583 mkmf.rb: directory timestamp
* lib/mkmf.rb (create_makefile): use timestamp file dependencies for
  directories.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-23 12:48:15 +00:00
nobu 9f4f154501 mkmf.rb: unexpand macros
* lib/mkmf.rb: unexpand macros.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-23 12:46:48 +00:00
nobu 255e1b05b1 mkmf.rb: library path quote
* lib/mkmf.rb (LIBPATHFLAG): no needs to escape library path here.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-23 12:45:21 +00:00
nobu de9093ad29 mkmf.rb: use internal path
* lib/mkmf.rb (MakeMakefile#configuration): make prefix paths
  internal to deal with in Makefile.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-23 12:44:30 +00:00
nobu 87fe2bfdcf mkmf.rb: fallback mkintpath
* lib/mkmf.rb (MakeMakefile#mkintpath): not a global function now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-23 12:42:29 +00:00
svn ca7ffa3418 * 2012-09-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-22 17:36:52 +00:00
eregon 63f6cda815 * complex.c: Fix examples of r36993.
Keep the simple definition, mathematics define the result.
  Based on patch by Robin Dupret. Fixes #188 on github.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-22 17:36:47 +00:00
svn f9ff150553 * 2012-09-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-21 22:15:26 +00:00
zzak e4ac8fa282 * ext/ripper/lib/ripper.rb:
Match sample output to Ripper.sexp from current trunk version.
  [Bug #6929]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-21 22:15:21 +00:00
svn 523290ac13 * 2012-09-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-21 00:35:13 +00:00
nobu ecc80b3cb4 mkmf.rb: untabify
* lib/mkmf.rb: untabify.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-21 00:35:09 +00:00
kosaki d9dfe2e514 * thread_pthread.c (native_cond_initialize): destroy condattr
after using it. Patch by Stanislav Sedov. Thank you.
  [Bug #7041] [ruby-core:47619]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-20 14:16:02 +00:00
kosaki 187d2bc1d6 * thread_pthread.c (native_cond_initialize): clean up #ifdef condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-20 14:15:46 +00:00
naruse 025a2479ae * lib/drb/ssl.rb (DRb::DRbSSLSocket::SSLConfig::DEFAULT): add
SSLTmpDhCallback for configuration option.

* lib/drb/ssl.rb (setup_ssl_context): copy the value of tmp_dh_callback.

* test/drb/ut_array_drbssl.rb: set tmp_dh_callback to suppress warning.

* test/drb/ut_drb_drbssl.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-20 08:05:08 +00:00
naruse 796700aca7 check @there if it is nil to prevent infinite loop
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-20 08:05:05 +00:00
nobu 4e195e0ff3 Revert r36994 "* lib/find.rb: Error in documentation example"
* lib/find.rb: revert wrong example.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-20 07:14:54 +00:00
nobu 2b64e10feb remove garbages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-20 07:06:06 +00:00
usa a9fefe7555 * test/drb/ut_drb.rb: revert a part of r36987, and get rid of a warning
with another method.  if the substitution is removed, the ExtSrv
  object will be GC'ed and some tests will be blocked.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-20 01:59:52 +00:00
zzak 2a50cecab8 * lib/find.rb: Error in documentation example
Found by Herwin Weststrate, thank you!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-20 01:32:08 +00:00
zzak 7c4d0468df * complex.c: Examples for Complex Documentation.
Patch by Robin Dupret.
  Fixes #184 on github.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-19 22:23:15 +00:00
zzak cca61dafe8 * ext/ripper/lib/ripper.rb: Documentation for Ripper.
+:void_stmt+ is meaningless
  [Bug #6929] [ruby-core:47507]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-19 22:17:16 +00:00
zzak 0503756fe5 * lib/csv.rb (Object#CSV, Array#to_csv, String#parse_csv):
Examples and documentation for CSV.
  [Bug #6880] [ruby-core:47218]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-19 22:07:44 +00:00
svn f205ac490e * 2012-09-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-19 15:42:32 +00:00
nobu abeedb0875 array.c, enum.c: TypeError in zip
* array.c (take_items), enum.c (enum_zip): raise TypeError at
  non-enumerable objects, not NoMethodError.  [ruby-dev:46145]
  [Bug #7038]
* vm_eval.c (rb_check_block_call): check_funcall variant with block
  function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-19 15:42:26 +00:00
svn b70f99d15f * 2012-09-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-19 14:49:22 +00:00