mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* struct.c (rb_struct_select): fix typo.
* io.c (io_write): check error if written data is less than specified size to detect EPIPE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									29b36962fe
								
							
						
					
					
						commit
						cd948e4600
					
				
					 3 changed files with 12 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -4,6 +4,10 @@ Fri Apr 12 12:54:04 2002  NAKAMURA Usaku <usa@ruby-lang.org>
 | 
			
		|||
 | 
			
		||||
	* win32/config.h.in: define HAVE_COSH, HAVE_SINH, and HAVE_TANH.
 | 
			
		||||
 | 
			
		||||
Fri Apr 12 02:58:55 2002  Koji Arai  <jca02266@nifty.ne.jp>
 | 
			
		||||
 | 
			
		||||
	* struct.c (rb_struct_select): fix typo.
 | 
			
		||||
 | 
			
		||||
Fri Apr 12 00:34:17 2002  Nobuyoshi Nakada  <nobu.nakada@nifty.ne.jp>
 | 
			
		||||
 | 
			
		||||
	* MANIFEST (missing/acosh.c): added.
 | 
			
		||||
| 
						 | 
				
			
			@ -17,6 +21,11 @@ Fri Apr 12 00:34:17 2002  Nobuyoshi Nakada  <nobu.nakada@nifty.ne.jp>
 | 
			
		|||
 | 
			
		||||
	* missing/acosh.c: added for acosh(), asinh() and atanh().
 | 
			
		||||
 | 
			
		||||
Thu Apr 11 20:01:44 2002  Masahiro Tomita  <tommy@tmtm.org>
 | 
			
		||||
 | 
			
		||||
	* io.c (io_write): check error if written data is less than
 | 
			
		||||
	  specified size to detect EPIPE.
 | 
			
		||||
 | 
			
		||||
Thu Apr 11 19:10:37 2002  WATANABE Hirofumi  <eban@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* io.c (remain_size): IO#read returns "" if file.size == 0.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								io.c
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								io.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -290,11 +290,11 @@ io_write(io, str)
 | 
			
		|||
		break;
 | 
			
		||||
	n = ptr - RSTRING(str)->ptr;
 | 
			
		||||
    }
 | 
			
		||||
    if (n == 0 && ferror(f))
 | 
			
		||||
    if (n != RSTRING(str)->len && ferror(f))
 | 
			
		||||
	rb_sys_fail(fptr->path);
 | 
			
		||||
#else
 | 
			
		||||
    n = fwrite(RSTRING(str)->ptr, 1, RSTRING(str)->len, f);
 | 
			
		||||
    if (n == 0 && ferror(f)) {
 | 
			
		||||
    if (n != RSTRING(str)->len && ferror(f)) {
 | 
			
		||||
	rb_sys_fail(fptr->path);
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								struct.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								struct.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -540,7 +540,7 @@ rb_struct_select(argc, argv, s)
 | 
			
		|||
	    rb_raise(rb_eArgError, "wrong number arguments(%d for 0)", argc);
 | 
			
		||||
	}
 | 
			
		||||
	for (i = 0; i < RSTRUCT(s)->len; i++) {
 | 
			
		||||
	    if (RTEST(rb_yield(RARRAY(s)->ptr[i]))) {
 | 
			
		||||
	    if (RTEST(rb_yield(RSTRUCT(s)->ptr[i]))) {
 | 
			
		||||
		rb_ary_push(result, RSTRUCT(s)->ptr[i]);
 | 
			
		||||
	    }
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue