pkgsrc/lang/ruby22-base/patches/patch-lib_rdoc_ri_driver.rb
taca 99680f5c7d Adding Ruby 2.2.1 package, this is ruby22-base.
From release announce:

We are pleased to announce the release of Ruby 2.2.1. This is the first TEENY
version release of the stable 2.2 series.

This release includes the fix for ffi build failure and memory leak issue on
Symbol GC (See Bug #10686).

See ChangeLog for details.
2015-03-08 16:24:55 +00:00

37 lines
987 B
Ruby

$NetBSD: patch-lib_rdoc_ri_driver.rb,v 1.1 2015/03/08 16:24:55 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 2013-09-18 23:33:36.000000000 +0000
+++ lib/rdoc/ri/driver.rb
@@ -2,11 +2,6 @@ require 'abbrev'
require 'optparse'
begin
- require 'readline'
-rescue LoadError
-end
-
-begin
require 'win32console'
rescue LoadError
end
@@ -1069,6 +1064,11 @@ The ri pager can be set with the 'RI_PAG
# 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