[ruby-cvs:62820] ko1:r55656 (trunk): * iseq.c (Init_ISeq): undef ISeq.translate and ISeq.load_iseq

ko1 at ruby-lang.org ko1 at ruby-lang.org
Wed Jul 13 14:26:00 JST 2016


ko1	2016-07-13 14:26:00 +0900 (Wed, 13 Jul 2016)

  New Revision: 55656

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55656

  Log:
    * iseq.c (Init_ISeq): undef ISeq.translate and ISeq.load_iseq
      to prevent calling super classes' methods.
    
      Without this patch, you can write workaround like:
    
        class << RubyVM::InstructionSequence
          def translate; end
          undef translate
        end
    
    * test/ruby/test_iseq.rb: add a test.

  Modified files:
    trunk/ChangeLog
    trunk/iseq.c
    trunk/test/ruby/test_iseq.rb


More information about the ruby-cvs mailing list