summaryrefslogtreecommitdiff
path: root/lang/ruby19-base/patches/patch-au
blob: 9e1d0d1bd4ccf60e11960909ac8a84cde9da83dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$NetBSD: patch-au,v 1.1.1.1 2010/09/12 03:50:06 taca Exp $

Defer loading readline, when it is really needed.
Some unknown reason:

1. build devel/ruby-readline with editline(3).
2. Execute a ruby script loading readline in background from shell.
3. When the script output something to stdout, it got SIGTSTP and suspends.

There is no such problem when build devel/ruby-readline with GNU's readline.

--- lib/rdoc/ri/driver.rb.orig	2010-07-01 02:05:35.000000000 +0000
+++ lib/rdoc/ri/driver.rb
@@ -1,11 +1,6 @@
 require 'abbrev'
 require 'optparse'
 
-begin
-  require 'readline'
-rescue LoadError
-end
-
 require 'rdoc/ri'
 require 'rdoc/ri/paths'
 require 'rdoc/markup'
@@ -809,6 +804,11 @@ Options may also be set in the 'RI' envi
   # Runs ri interactively using Readline if it is available.
 
   def interactive
+    begin
+      require 'readline'
+    rescue LoadError
+    end
+
     puts "\nEnter the method name you want to look up."
 
     if defined? Readline then