mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* iseq.c: rename methods
RubyVM::InstructionSequence#to_binary_format -> #to_binary
  RubyVM::InstructionSequence.from_binary_format -> .load_from_binary
  RubyVM::InstructionSequence.from_binary_format_extra_data ->
                             .load_from_binary_extra_data
* iseq.c: fix document of iseq.to_binary.
  [Fix GH-1134]
* sample/iseq_loader.rb: catch up this change.
* test/lib/iseq_loader_checker.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
			
			
This commit is contained in:
		
							parent
							
								
									98b75d59b9
								
							
						
					
					
						commit
						4b8da4b9c8
					
				
					 4 changed files with 35 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -51,18 +51,18 @@ class RubyVM::InstructionSequence
 | 
			
		|||
                                     RubyVM::InstructionSequence.iseq_load(ary)
 | 
			
		||||
                                   }) if CHECK_TO_A && defined?(RubyVM::InstructionSequence.iseq_load)
 | 
			
		||||
 | 
			
		||||
    # check to_binary_format
 | 
			
		||||
    # check to_binary
 | 
			
		||||
    i2_bin = compare_dump_and_load(i1,
 | 
			
		||||
                                   proc{|iseq|
 | 
			
		||||
                                     begin
 | 
			
		||||
                                       iseq.to_binary_format
 | 
			
		||||
                                       iseq.to_binary
 | 
			
		||||
                                     rescue RuntimeError => e # not a toplevel
 | 
			
		||||
                                       # STDERR.puts [:failed, e, iseq].inspect
 | 
			
		||||
                                       nil
 | 
			
		||||
                                     end
 | 
			
		||||
                                   },
 | 
			
		||||
                                   proc{|bin|
 | 
			
		||||
                                     iseq = RubyVM::InstructionSequence.from_binary_format(bin)
 | 
			
		||||
                                     iseq = RubyVM::InstructionSequence.load_from_binary(bin)
 | 
			
		||||
                                     # STDERR.puts iseq.inspect
 | 
			
		||||
                                     iseq
 | 
			
		||||
                                   }) if CHECK_TO_BINARY
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue