[#3567] Nil is a subclass of Object? — shugo@... (maeda shugo)

前田です。

26 messages 1997/08/02
[#3570] Re: Nil is a subclass of Object? — matz@... (Yukihiro Matsumoto) 1997/08/03

まつもと ゆきひろです

[#3572] Re: Nil is a subclass of Object? — keiju@... (石塚圭樹 ) 1997/08/03

けいじゅ@日本ラショナルです.

[#3573] Re: Nil is a subclass of Object? — matz@... (Yukihiro Matsumoto) 1997/08/03

まつもと ゆきひろです

[#3715] may i make a ruby.rpm? — Shoichi OZAWA <ozawa@...>

こんにちは 小澤@日立 です。

15 messages 1997/08/20

[#3736] module for GNU Readline Library — shugo@... (前田 修吾 / maeda shugo)

前田です。

12 messages 1997/08/20

[#3833] [Bug] Regexp.quote — shugo@... (前田 修吾 / maeda shugo)

前田です。

25 messages 1997/08/26
[#3836] BEGIN and END — Masaki Suketa <suke@...> 1997/08/26

助田です。

[#3837] Re: BEGIN and END — matz@... (Yukihiro Matsumoto) 1997/08/27

まつもと ゆきひろです

[#3842] Re: BEGIN and END — keiju@... (石塚圭樹 ) 1997/08/27

けいじゅ@日本ラショナルです.

[#3839] Re: SyslogSendmail class — takagi@... (TAKAGI Hiromitsu)

> そうですね.本当はこーゆーのが ruby-list の本来の形ですね.

18 messages 1997/08/27
[#3840] Re: SyslogSendmail class — matz@... (Yukihiro Matsumoto) 1997/08/27

まつもと ゆきひろです

[#3852] Re: SyslogSendmail class — keiju@... (石塚圭樹 ) 1997/08/27

けいじゅ@日本ラショナルソフトウェアです.

[#3909] Object#id <=> Fixnum#id2object ? (Re: SyslogSendmail class) — shugo@... (前田 修吾 / maeda shugo) 1997/08/28

前田です。

[#3869] Re: SyslogSendmail class — takagi@... (TAKAGI Hiromitsu)

> Moduleのところに書いてあるんですねえ.こういうノウハウを記述

15 messages 1997/08/27
[#3870] Re: SyslogSendmail class — matz@... (Yukihiro Matsumoto) 1997/08/27

まつもと ゆきひろです

[#3906] document for beginner — toyofuku@...

豊福@パパイヤです。

21 messages 1997/08/28
[#3917] Re: document for beginner — Kikutani Makoto <kikutani@...> 1997/08/29

きくたにです。

[#3925] Re: document for beginner — Masaki Suketa <suke@...> 1997/08/29

助田です

[#3926] Curses (Re: document for beginner) — Kikutani Makoto <kikutani@...> 1997/08/29

Fri, Aug 29, 1997 at 12:54:15PM +0900 において

[#3933] Re: ruby constants — toyofuku@...

豊福@パパイヤです。

16 messages 1997/08/29
[#3934] Re: ruby constants — matz@... (Yukihiro Matsumoto) 1997/08/29

まつもと ゆきひろです

[#3939] Re: ruby constants — WATANABE Hirofumi <watanabe@...> 1997/08/29

わたなべです.

[ruby-list:3746] Re: module for GNU Readline Library

From: shugo@... (前田 修吾 / maeda shugo)
Date: 1997-08-21 05:14:54 UTC
List: ruby-list #3746
前田です。

In message "[ruby-list:3736] module for GNU Readline Library"
前田 修吾 / maeda shugo <shugo@po.aianet.ne.jp> wrote:

|アーカイブにはサンプルとしてeval.rbの拡張版のrubyshという
|スクリプトが入っています。

未入力時の補完があまりに遅いのでちょっと手を加えました。
以下のパッチをあててください。

-- 
前田 修吾

diff -u -r1.1 rubysh
--- rubysh	1997/08/20 15:20:41	1.1
+++ rubysh	1997/08/20 16:30:40
@@ -17,24 +17,12 @@
    PS2 = "ruby| "
    
    KEYWORDS = [
-      "end",
-      "class", "module",
-      "def", "undef",
-      "return",
-      "if", "unless", "else", "elsif", "then",
-      "not", "and", "or",
-      "raise", "fail",
-      "while", "loop",
-      "for", "in",
-      "case", "when",
-      "self", "super", "nil",
-      "alias",
-      "until",
-      "begin", "ensure", "rescue",
-      "do", "yield",
-      "break", "next", "continue", "retry", "redo",
-      "include",
-      "load", "require", "autoload"
+      "end", "class", "module", "def", "undef",
+      "return", "if", "unless", "else", "elsif", "then",
+      "not", "and", "or", "while", "loop", "for", "in",
+      "case", "when", "self", "super", "nil", "alias",
+      "until", "begin", "ensure", "rescue", "do", "yield",
+      "include"
    ]
    
    CLASSES = [
@@ -59,7 +47,8 @@
       "raise", "rand", "readline", "readlines", "require",
       "redo", "retry", "select", "sleep", "split", "sprintf",
       "srand", "sub", "sub!", "syscall", "system", "test",
-      "trace_var", "trap", "ungetc", "untrace_var"
+      "trace_var", "trap", "ungetc", "untrace_var",
+      "continue", "fail"
    ]
    
    COMPLETION_ENTRIES = KEYWORDS | CLASSES | FUNCTIONS
@@ -69,9 +58,13 @@
       @prompt = PS1
       @indent = 0
       set_completion_proc { |str|
-	 exp = Regexp.new("^" + str)
-	 COMPLETION_ENTRIES.find_all do |word|
-	    word =~ exp
+	 if str == ""
+	    COMPLETION_ENTRIES
+	 else
+	    exp = Regexp.new("^" + str)
+	    COMPLETION_ENTRIES.find_all do |word|
+	       word =~ exp
+	    end
 	 end
       }
 

In This Thread