summaryrefslogtreecommitdiff
path: root/ext/pty
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-04 06:49:00 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-04 06:49:00 +0000
commit411083a9a6fa2767657b5e69c776c5abc521e5cd (patch)
tree97dfb98aba0a89994938fb247dca759ef6f7c5ff /ext/pty
parentd4502a676715d699f620c14e27e1de79ba86fa49 (diff)
ext/pty: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-rw-r--r--ext/pty/extconf.rb2
-rw-r--r--ext/pty/lib/expect.rb5
2 files changed, 3 insertions, 4 deletions
diff --git a/ext/pty/extconf.rb b/ext/pty/extconf.rb
index 844902b1f7..4379177755 100644
--- a/ext/pty/extconf.rb
+++ b/ext/pty/extconf.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
require 'mkmf'
$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
diff --git a/ext/pty/lib/expect.rb b/ext/pty/lib/expect.rb
index 122562127d..eaa6ccac94 100644
--- a/ext/pty/lib/expect.rb
+++ b/ext/pty/lib/expect.rb
@@ -1,4 +1,4 @@
-# frozen_string_literal: false
+# frozen_string_literal: true
$expect_verbose = false
# Expect library adds the IO instance method #expect, which does similar act to
@@ -31,7 +31,7 @@ class IO
# or yielded. However, the buffer in a timeout session is kept for the next
# expect call. The default timeout is 9999999 seconds.
def expect(pat,timeout=9999999)
- buf = ''
+ buf = ''.dup
case pat
when String
e_pat = Regexp.new(Regexp.quote(pat))
@@ -69,4 +69,3 @@ class IO
nil
end
end
-