pkgsrc/lang/ruby193-base/patches/patch-lib_rdoc_ri_driver.rb
taca 2e1860a66f Importing ruby193-base version 1.9.3p0 (Ruby 1.9.3 p0):
Please refer detail for:
	http://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_0/NEWS
	http://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_0/ChangeLog

Short summary from NEWS:

* Ruby's License is changed from a dual license with GPLv2
  to a dual license with 2-clause BSDL.

* Encoding
  * new encodings: CP950, CP951, UTF-16 and UTF-32
  * change alias:
    * SJIS is Windows-31J

* Regexps now support Unicode 6.0. (new characters and scripts)

* builtin classes

  * ARGF
    * new methods: ARGF.read_nonblock and so on.
  * Array
    * extended method: Array#pack supports endian modifiers
  * String
    * extended method: String#unpack supports endian modifiers
    * new method: String#prepend and String#byteslice
  * Bignum
    * Multiplication algorithm for Bignums with a large number of digits over
      150 BDIGITs is changed in order to reduce its calculation time.
      Now such large Bignums are multiplied by using Toom-3 algorithm.
  * File
    * new constant: File::NULL and File::DIRECT
  * IO
    * extended method: IO#putc supports multibyte characters
    * new methods: * IO#advise, IO.write and IO.binwrite
  * Kernel
    * move #__id__ to BasicObject
    * extended method: Kernel#rand supports range argument
  * Module
    * new methods: Module#private_constant and Module#public_constant
  * Random
    * extended method: Random.rand supports range argument
  * Time
    * extended method: Time#strftime supports %:z and %::z
  * Process
    * Process#maxgroups and Process#maxgroups= now raise NotImplementedError if
      the platform don't support supplementary groups concept
2011-11-08 16:10:51 +00:00

37 lines
985 B
Ruby

$NetBSD: patch-lib_rdoc_ri_driver.rb,v 1.1.1.1 2011/11/08 16:10:51 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 2011-08-05 21:21:55.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
@@ -858,6 +853,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