summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ext/pty/lib/expect.rb2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 73c25d4c0f..ee10726b23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Apr 9 23:58:58 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/pty/lib/expect.rb: raise an error when argument is unexpected
+ type. based on a patch from Luiz Angelo Daros de Luca in
+ [ruby-core:23464].
+
Fri Apr 9 23:57:35 2010 Yusuke Endoh <mame@tsg.ne.jp>
* ext/pty/lib/expect.rb: add rdoc. based on a patch from Luiz Angelo
diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb
index 50d2fbd363..52396d90bd 100644
--- a/ext/pty/lib/expect.rb
+++ b/ext/pty/lib/expect.rb
@@ -14,6 +14,8 @@ class IO
e_pat = Regexp.new(Regexp.quote(pat))
when Regexp
e_pat = pat
+ else
+ raise TypeError, "unsupported pattern class: #{pattern.class}"
end
while true
if !IO.select([self],nil,nil,timeout) or eof? then