mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* lib/cgi.rb (CGI::Cookie): [ruby-talk:130040]
* object.c: [ruby-doc:818] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									b4f51b41e2
								
							
						
					
					
						commit
						46c954bfda
					
				
					 8 changed files with 48 additions and 32 deletions
				
			
		
							
								
								
									
										33
									
								
								ChangeLog
									
										
									
									
									
								
							
							
						
						
									
										33
									
								
								ChangeLog
									
										
									
									
									
								
							|  | @ -1,9 +1,17 @@ | |||
| Tue Feb  8 09:30:01 2005  Yukihiro Matsumoto  <matz@ruby-lang.org> | ||||
| 
 | ||||
| 	* lib/cgi.rb (CGI::Cookie): [ruby-talk:130040] | ||||
| 
 | ||||
| Tue Feb  8 00:19:02 2005  Tanaka Akira  <akr@m17n.org> | ||||
| 
 | ||||
| 	* lib/resolv.rb (Resolv::DNS::Name#subdomain_of?): new method. | ||||
| 	  (Resolv::DNS::Name#inspect): ditto. | ||||
| 	  Suggested by Sam Roberts.  [ruby-talk:129086] | ||||
| 
 | ||||
| Mon Feb  7 10:06:30 2005  Yukihiro Matsumoto  <matz@ruby-lang.org> | ||||
| 
 | ||||
| 	* object.c: [ruby-doc:818] | ||||
| 
 | ||||
| Mon Feb  7 01:56:20 2005  NAKAMURA Usaku  <usa@ruby-lang.org> | ||||
| 
 | ||||
| 	* instruby.rb, rubytest.rb (srcdir): no longer embed srcdir into | ||||
|  | @ -123,6 +131,10 @@ Mon Jan 31 13:33:21 2005  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp> | |||
| 
 | ||||
| 	* ext/tk/lib/remote-tk.rb: ditto | ||||
| 
 | ||||
| Mon Jan 31 10:29:18 2005  Yukihiro Matsumoto  <matz@ruby-lang.org> | ||||
| 
 | ||||
| 	* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330] | ||||
| 
 | ||||
| 	Sat Jan 29 09:42:12 2005  Sam Roberts  <sroberts@uniserve.com> | ||||
| 
 | ||||
| 	* lib/resolv.rb (Resolv::DNS::Resource::IN::SRV): Added RFC2782 SRV | ||||
|  | @ -137,6 +149,11 @@ Fri Jan 28 17:16:55 2005  Tanaka Akira  <akr@m17n.org> | |||
| 	  (Resolv::DNS::Config#lazy_initialize): ditto. | ||||
| 	  Suggested by Sam Roberts. | ||||
| 
 | ||||
| Thu Jan 27 13:18:03 2005  Yukihiro Matsumoto  <matz@ruby-lang.org> | ||||
| 
 | ||||
| 	* st.c (st_foreach): report success/failure by return value. | ||||
| 	  [ruby-Bugs-1396] | ||||
| 
 | ||||
| Thu Jan 27 00:15:29 2005  Minero Aoki  <aamine@loveruby.net> | ||||
| 
 | ||||
| 	* test/fileutils/test_fileutils.rb (setup): support BSD-style | ||||
|  | @ -2268,6 +2285,14 @@ Mon Oct 18 02:04:11 2004  GOTOU Yuuzou  <gotoyuzo@notwork.org> | |||
| 	  do_not_reverse_lookup for each socket if :DoNotReverseLookup | ||||
| 	  is set.  [ruby-core:02357] | ||||
| 
 | ||||
| Mon Oct 18 00:42:45 2004  Yukihiro Matsumoto  <matz@ruby-lang.org> | ||||
| 
 | ||||
| 	* ext/socket/socket.c (sock_s_getservbyaname): protocol string | ||||
| 	  might be altered.  [ruby-dev:24503] | ||||
| 
 | ||||
| 	* string.c (rb_str_upto): check if return value from succ is a | ||||
| 	  string.  [ruby-dev:24504] | ||||
| 
 | ||||
| Sun Oct 17 23:03:48 2004  Hidetoshi NAGAI  <nagai@ai.kyutech.ac.jp> | ||||
| 
 | ||||
| 	* ext/tk/lib/tk/timer.rb: TkTimer#start and restart accept a block | ||||
|  | @ -2360,14 +2385,6 @@ Thu Oct  7 12:55:04 2004  Yukihiro Matsumoto  <matz@ruby-lang.org> | |||
| 	  switch. [ruby-dev:24442] | ||||
| 
 | ||||
| 	* pack.c (pack_unpack): string conversion should at the top of the | ||||
| Mon Oct 18 00:42:45 2004  Yukihiro Matsumoto  <matz@ruby-lang.org> | ||||
| 
 | ||||
| 	* ext/socket/socket.c (sock_s_getservbyaname): protocol string | ||||
| 	  might be altered.  [ruby-dev:24503] | ||||
| 
 | ||||
| 	* string.c (rb_str_upto): check if return value from succ is a | ||||
| 	  string.  [ruby-dev:24504] | ||||
| 
 | ||||
| 	  method.  [ruby-dev:24439] | ||||
| 
 | ||||
| 	* io.c (io_read): buffer should be frozen only after the length | ||||
|  |  | |||
							
								
								
									
										21
									
								
								hash.c
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								hash.c
									
										
									
									
									
								
							|  | @ -121,17 +121,14 @@ struct foreach_safe_arg { | |||
| }; | ||||
| 
 | ||||
| static int | ||||
| foreach_safe_i(key, value, arg, err) | ||||
| foreach_safe_i(key, value, arg) | ||||
|     st_data_t key, value; | ||||
|     struct foreach_safe_arg *arg; | ||||
| { | ||||
|     int status; | ||||
| 
 | ||||
|     if (err) { | ||||
| 	rb_raise(rb_eRuntimeError, "hash modified during iteration"); | ||||
|     } | ||||
|     if (key == Qundef) return ST_CONTINUE; | ||||
|     status = (*arg->func)(key, value, arg->arg, err); | ||||
|     status = (*arg->func)(key, value, arg->arg); | ||||
|     if (status == ST_CONTINUE) { | ||||
| 	return ST_CHECK; | ||||
|     } | ||||
|  | @ -149,7 +146,9 @@ st_foreach_safe(table, func, a) | |||
|     arg.tbl = table; | ||||
|     arg.func = func; | ||||
|     arg.arg = a; | ||||
|     st_foreach(table, foreach_safe_i, (st_data_t)&arg); | ||||
|     if (st_foreach(table, foreach_safe_i, (st_data_t)&arg)) { | ||||
| 	rb_raise(rb_eRuntimeError, "hash modified during iteration"); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| struct hash_foreach_arg { | ||||
|  | @ -159,17 +158,13 @@ struct hash_foreach_arg { | |||
| }; | ||||
| 
 | ||||
| static int | ||||
| hash_foreach_iter(key, value, arg, err) | ||||
| hash_foreach_iter(key, value, arg) | ||||
|     VALUE key, value; | ||||
|     struct hash_foreach_arg *arg; | ||||
|     int err; | ||||
| { | ||||
|     int status; | ||||
|     st_table *tbl; | ||||
| 
 | ||||
|     if (err) { | ||||
|  	rb_raise(rb_eRuntimeError, "hash modified during iteration"); | ||||
|     } | ||||
|     tbl = RHASH(arg->hash)->tbl;     | ||||
|     if (key == Qundef) return ST_CONTINUE; | ||||
|     status = (*arg->func)(key, value, arg->arg); | ||||
|  | @ -207,7 +202,9 @@ static VALUE | |||
| hash_foreach_call(arg) | ||||
|     struct hash_foreach_arg *arg; | ||||
| { | ||||
|     st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg); | ||||
|     if (st_foreach(RHASH(arg->hash)->tbl, hash_foreach_iter, (st_data_t)arg)) { | ||||
|  	rb_raise(rb_eRuntimeError, "hash modified during iteration"); | ||||
|     } | ||||
|     return Qnil; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -770,7 +770,7 @@ class CGI | |||
|   #   cookie1.domain  = 'domain' | ||||
|   #   cookie1.expires = Time.now + 30 | ||||
|   #   cookie1.secure  = true | ||||
|   class Cookie < SimpleDelegator | ||||
|   class Cookie < DelegateClass(Array) | ||||
| 
 | ||||
|     # Create a new CGI::Cookie object. | ||||
|     # | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ module IRB | |||
|       @inspect_mode = IRB.conf[:INSPECT_MODE] | ||||
| 
 | ||||
|       self.math_mode = IRB.conf[:MATH_MODE] if IRB.conf[:MATH_MODE] | ||||
|       self.use_tracer = IRB.conf[:USE_TRACER] if IRB.conf[:USE_TRASER] | ||||
|       self.use_tracer = IRB.conf[:USE_TRACER] if IRB.conf[:USE_TRACER] | ||||
|       self.use_loader = IRB.conf[:USE_LOADER] if IRB.conf[:USE_LOADER] | ||||
|       self.eval_history = IRB.conf[:EVAL_HISTORY] if IRB.conf[:EVAL_HISTORY] | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										6
									
								
								object.c
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								object.c
									
										
									
									
									
								
							|  | @ -2009,7 +2009,8 @@ rb_obj_ivar_get(obj, iv) | |||
|  *   | ||||
|  *  Sets the instance variable names by <i>symbol</i> to | ||||
|  *  <i>object</i>, thereby frustrating the efforts of the class's | ||||
|  *  author to attempt to provide proper encapsulation. | ||||
|  *  author to attempt to provide proper encapsulation. The variable | ||||
|  *  did not have to exist prior to this call. | ||||
|  *      | ||||
|  *     class Fred | ||||
|  *       def initialize(p1, p2) | ||||
|  | @ -2018,7 +2019,8 @@ rb_obj_ivar_get(obj, iv) | |||
|  *     end | ||||
|  *     fred = Fred.new('cat', 99) | ||||
|  *     fred.instance_variable_set(:@a, 'dog')   #=> "dog" | ||||
|  *     fred.inspect                             #=> "#<Fred:0x401b3da8 @a=\"dog\", @b=99>" | ||||
|  *     fred.instance_variable_set(:@c, 'cat')   #=> "cat" | ||||
|  *     fred.inspect                             #=> "#<Fred:0x401b3da8 @a=\"dog\", @b=99, @c=\"cat\">" | ||||
|  */ | ||||
| 
 | ||||
| static VALUE | ||||
|  |  | |||
							
								
								
									
										10
									
								
								st.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								st.c
									
										
									
									
									
								
							|  | @ -480,7 +480,7 @@ st_cleanup_safe(table, never) | |||
|     table->num_entries = num_entries; | ||||
| } | ||||
| 
 | ||||
| void | ||||
| int | ||||
| st_foreach(table, func, arg) | ||||
|     st_table *table; | ||||
|     int (*func)(); | ||||
|  | @ -493,7 +493,7 @@ st_foreach(table, func, arg) | |||
|     for(i = 0; i < table->num_bins; i++) { | ||||
| 	last = 0; | ||||
| 	for(ptr = table->bins[i]; ptr != 0;) { | ||||
| 	    retval = (*func)(ptr->key, ptr->record, arg, 0); | ||||
| 	    retval = (*func)(ptr->key, ptr->record, arg); | ||||
| 	    switch (retval) { | ||||
| 	    case ST_CHECK:	/* check if hash is modified during iteration */ | ||||
| 	        tmp = 0; | ||||
|  | @ -504,8 +504,7 @@ st_foreach(table, func, arg) | |||
| 		} | ||||
| 		if (!tmp) { | ||||
| 		    /* call func with error notice */ | ||||
| 		    retval = (*func)(0, 0, arg, 1); | ||||
| 		    return; | ||||
| 		    return 1; | ||||
| 		} | ||||
| 		/* fall through */ | ||||
| 	    case ST_CONTINUE: | ||||
|  | @ -513,7 +512,7 @@ st_foreach(table, func, arg) | |||
| 		ptr = ptr->next; | ||||
| 		break; | ||||
| 	    case ST_STOP: | ||||
| 		return; | ||||
| 	        return 0; | ||||
| 	    case ST_DELETE: | ||||
| 		tmp = ptr; | ||||
| 		if (last == 0) { | ||||
|  | @ -528,6 +527,7 @@ st_foreach(table, func, arg) | |||
| 	    } | ||||
| 	} | ||||
|     } | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
| static int | ||||
|  |  | |||
							
								
								
									
										2
									
								
								st.h
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								st.h
									
										
									
									
									
								
							|  | @ -48,7 +48,7 @@ int st_delete _((st_table *, st_data_t *, st_data_t *)); | |||
| int st_delete_safe _((st_table *, st_data_t *, st_data_t *, st_data_t)); | ||||
| int st_insert _((st_table *, st_data_t, st_data_t)); | ||||
| int st_lookup _((st_table *, st_data_t, st_data_t *)); | ||||
| void st_foreach _((st_table *, int (*)(ANYARGS), st_data_t)); | ||||
| int st_foreach _((st_table *, int (*)(ANYARGS), st_data_t)); | ||||
| void st_add_direct _((st_table *, st_data_t, st_data_t)); | ||||
| void st_free_table _((st_table *)); | ||||
| void st_cleanup_safe _((st_table *, st_data_t)); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 matz
						matz