mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* object.c (rb_obj_clone): defer copying freezing state after
calling initialize_copy(). [ruby-dev:20276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									717302e2c4
								
							
						
					
					
						commit
						c3584231ba
					
				
					 5 changed files with 11 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Fri May 23 01:26:26 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* object.c (rb_obj_clone): defer copying freezing state after
 | 
			
		||||
	  calling initialize_copy().  [ruby-dev:20276]
 | 
			
		||||
 | 
			
		||||
Thu May 22 17:12:10 2003  Yukihiro Matsumoto  <matz@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* gc.c (run_final): use rb_thread_critical instead of DEFER_INTS.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -231,7 +231,7 @@ class Context
 | 
			
		|||
	stdout.print "Should be Class/Module: ", input, "\n"
 | 
			
		||||
      else
 | 
			
		||||
	len = 0
 | 
			
		||||
	for v in obj.instance_methods.sort
 | 
			
		||||
	for v in obj.instance_methods(false).sort
 | 
			
		||||
	  len += v.size + 1
 | 
			
		||||
	  if len > 70
 | 
			
		||||
	    len = v.size + 1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -140,7 +140,7 @@ module IRB
 | 
			
		|||
	  ObjectSpace.each_object(Module){|m|
 | 
			
		||||
	    next if m.name != "IRB::Context" and 
 | 
			
		||||
	      /^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name
 | 
			
		||||
	    candidates.concat m.instance_methods
 | 
			
		||||
	    candidates.concat m.instance_methods(false)
 | 
			
		||||
	  }
 | 
			
		||||
	  candidates.sort!
 | 
			
		||||
	  candidates.uniq!
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ class Shell
 | 
			
		|||
      install_builtin_commands
 | 
			
		||||
 | 
			
		||||
      # define CommandProccessor#methods to Shell#methods and Filter#methods
 | 
			
		||||
      for m in CommandProcessor.instance_methods - NoDelegateMethods
 | 
			
		||||
      for m in CommandProcessor.instance_methods(false) - NoDelegateMethods
 | 
			
		||||
	add_delegate_command_to_shell(m)
 | 
			
		||||
      end
 | 
			
		||||
      
 | 
			
		||||
| 
						 | 
				
			
			@ -558,7 +558,7 @@ class Shell
 | 
			
		|||
 | 
			
		||||
      # method related FileTest
 | 
			
		||||
      def_builtin_commands(FileTest, 
 | 
			
		||||
		   FileTest.singleton_methods.collect{|m| [m, ["FILENAME"]]})
 | 
			
		||||
		   FileTest.singleton_methods(false).collect{|m| [m, ["FILENAME"]]})
 | 
			
		||||
 | 
			
		||||
      # method related ftools
 | 
			
		||||
      normal_delegation_ftools_methods = [
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								object.c
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								object.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -142,8 +142,9 @@ rb_obj_clone(obj)
 | 
			
		|||
    }
 | 
			
		||||
    clone = rb_obj_alloc(rb_obj_class(obj));
 | 
			
		||||
    RBASIC(clone)->klass = rb_singleton_class_clone(obj);
 | 
			
		||||
    RBASIC(clone)->flags = RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT);
 | 
			
		||||
    RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT)) & ~FL_FREEZE;
 | 
			
		||||
    init_copy(clone, obj);
 | 
			
		||||
    RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE;
 | 
			
		||||
 | 
			
		||||
    return clone;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue