use assert_predicate for unary operator

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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-25

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
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
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
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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
* 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
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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Merge branch 'trunk' of git://github.com/ruby/ruby into trunk
* 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
* 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
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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
* 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
* 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