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

ruby-changes:40512

From: knu <ko1@a...>
Date: Mon, 16 Nov 2015 16:41:59 +0900 (JST)
Subject: [ruby-changes:40512] knu:r52593 (trunk): * lib/set.rb: Enable frozen_string_literal.

knu	2015-11-16 16:41:30 +0900 (Mon, 16 Nov 2015)

  New Revision: 52593

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

  Log:
    * lib/set.rb: Enable frozen_string_literal.
    
    * lib/set.rb: Move << out of the begin block that ensures pop.

  Modified files:
    trunk/ChangeLog
    trunk/lib/set.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52592)
+++ ChangeLog	(revision 52593)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Nov 16 16:39:38 2015  Akinori MUSHA  <knu@i...>
+
+	* lib/set.rb: Enable frozen_string_literal.
+
+	* lib/set.rb: Move << out of the begin block that ensures pop.
+
 Mon Nov 16 16:28:30 2015  Akinori MUSHA  <knu@i...>
 
 	* lib/set.rb (Hash#flatten!, #add?, #delete?, #collect!, #reject!,
Index: lib/set.rb
===================================================================
--- lib/set.rb	(revision 52592)
+++ lib/set.rb	(revision 52593)
@@ -1,4 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/lib/set.rb#L1
 #--
+# frozen_string_literal: true
+#
 # set.rb - defines the Set class
 #++
 # Copyright (c) 2002-2013 Akinori MUSHA <knu@i...>
@@ -534,8 +536,8 @@ class Set https://github.com/ruby/ruby/blob/trunk/lib/set.rb#L536
       return sprintf('#<%s: {...}>', self.class.name)
     end
 
+    ids << object_id
     begin
-      ids << object_id
       return sprintf('#<%s: {%s}>', self.class, to_a.inspect[1..-2])
     ensure
       ids.pop

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

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