[前][次][番号順一覧][スレッド一覧]

ruby-changes:45454

From: kazu <ko1@a...>
Date: Sat, 4 Feb 2017 15:49:04 +0900 (JST)
Subject: [ruby-changes:45454] kazu:r57527 (trunk): ext/pty: Specify frozen_string_literal: true.

kazu	2017-02-04 15:49:00 +0900 (Sat, 04 Feb 2017)

  New Revision: 57527

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57527

  Log:
    ext/pty: Specify frozen_string_literal: true.

  Modified files:
    trunk/ext/pty/extconf.rb
    trunk/ext/pty/lib/expect.rb
Index: ext/pty/lib/expect.rb
===================================================================
--- ext/pty/lib/expect.rb	(revision 57526)
+++ ext/pty/lib/expect.rb	(revision 57527)
@@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ext/pty/lib/expect.rb#L1
-# 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 https://github.com/ruby/ruby/blob/trunk/ext/pty/lib/expect.rb#L31
   # 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 https://github.com/ruby/ruby/blob/trunk/ext/pty/lib/expect.rb#L69
     nil
   end
 end
-
Index: ext/pty/extconf.rb
===================================================================
--- ext/pty/extconf.rb	(revision 57526)
+++ ext/pty/extconf.rb	(revision 57527)
@@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/ext/pty/extconf.rb#L1
-# frozen_string_literal: false
+# frozen_string_literal: true
 require 'mkmf'
 
 $INCFLAGS << " -I$(topdir) -I$(top_srcdir)"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]