mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* ext/readline/readline.c (readline_readline): get rid of
libreadline's bug. (ruby-bugs-ja:PR#268) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									8d8af5225d
								
							
						
					
					
						commit
						47993929c4
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
/* readline.c -- GNU Readline module
 | 
			
		||||
   Copyright (C) 1997-2001  Shugo Maeda */
 | 
			
		||||
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <readline/readline.h>
 | 
			
		||||
#include <readline/history.h>
 | 
			
		||||
| 
						 | 
				
			
			@ -44,6 +45,8 @@ readline_readline(argc, argv, self)
 | 
			
		|||
	prompt = StringValuePtr(tmp);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "stdin closed");
 | 
			
		||||
 | 
			
		||||
    buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt,
 | 
			
		||||
                              &status);
 | 
			
		||||
    if (status) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue