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

ruby-changes:35216

From: hsbt <ko1@a...>
Date: Wed, 27 Aug 2014 21:10:37 +0900 (JST)
Subject: [ruby-changes:35216] hsbt:r47298 (trunk): * lib/drb/drb.rb: use attr_reader instead of Module#attr.

hsbt	2014-08-27 21:10:21 +0900 (Wed, 27 Aug 2014)

  New Revision: 47298

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

  Log:
    * lib/drb/drb.rb: use attr_reader instead of Module#attr.
      [Feature #10172][ruby-core:64582]
    * lib/irb/ruby-token.rb: ditto.
    * lib/net/telnet.rb: ditto.
    * lib/rdoc/ruby_token.rb: ditto.
    * lib/thwait.rb: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/lib/drb/drb.rb
    trunk/lib/irb/ruby-token.rb
    trunk/lib/net/telnet.rb
    trunk/lib/rdoc/ruby_token.rb
    trunk/lib/thwait.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47297)
+++ ChangeLog	(revision 47298)
@@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Aug 27 21:08:20 2014  gogo tanaka  <mail@t...>
+
+	* lib/drb/drb.rb: use attr_reader instead of Module#attr.
+	  [Feature #10172][ruby-core:64582]
+	* lib/irb/ruby-token.rb: ditto.
+	* lib/net/telnet.rb: ditto.
+	* lib/rdoc/ruby_token.rb: ditto.
+	* lib/thwait.rb: ditto.
+
 Wed Aug 27 19:52:33 2014  Masaki Suketa <masaki.suketa@n...>
 
 	* ext/win32ole/win32ole.c (vtdate2rbtime): try to convert millisecond
Index: lib/thwait.rb
===================================================================
--- lib/thwait.rb	(revision 47297)
+++ lib/thwait.rb	(revision 47298)
@@ -55,7 +55,7 @@ class ThreadsWait https://github.com/ruby/ruby/blob/trunk/lib/thwait.rb#L55
   end
 
   # Returns the array of threads that have not terminated yet.
-  attr :threads
+  attr_reader :threads
 
   #
   # Returns +true+ if there are no threads in the pool still running.
Index: lib/irb/ruby-token.rb
===================================================================
--- lib/irb/ruby-token.rb	(revision 47297)
+++ lib/irb/ruby-token.rb	(revision 47298)
@@ -24,14 +24,14 @@ module RubyToken https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-token.rb#L24
       @line_no = line_no
       @char_no = char_no
     end
-    attr :seek, :line_no, :char_no
+    attr_reader :seek, :line_no, :char_no
   end
 
   class TkNode < Token
     def initialize(seek, line_no, char_no)
       super
     end
-    attr :node
+    attr_reader :node
   end
 
   class TkId < Token
@@ -39,7 +39,7 @@ module RubyToken https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-token.rb#L39
       super(seek, line_no, char_no)
       @name = name
     end
-    attr :name
+    attr_reader :name
   end
 
   class TkVal < Token
@@ -47,7 +47,7 @@ module RubyToken https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-token.rb#L47
       super(seek, line_no, char_no)
       @value = value
     end
-    attr :value
+    attr_reader :value
   end
 
   class TkOp < Token
@@ -60,7 +60,7 @@ module RubyToken https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-token.rb#L60
       op = TkReading2Token[op][0] unless op.kind_of?(Symbol)
       @op = op
     end
-    attr :op
+    attr_reader :op
   end
 
   class TkUnknownChar < Token
@@ -68,7 +68,7 @@ module RubyToken https://github.com/ruby/ruby/blob/trunk/lib/irb/ruby-token.rb#L68
       super(seek, line_no, char_no)
       @name = name
     end
-    attr :name
+    attr_reader :name
   end
 
   class TkError < Token
Index: lib/rdoc/ruby_token.rb
===================================================================
--- lib/rdoc/ruby_token.rb	(revision 47297)
+++ lib/rdoc/ruby_token.rb	(revision 47298)
@@ -38,9 +38,9 @@ module RDoc::RubyToken https://github.com/ruby/ruby/blob/trunk/lib/rdoc/ruby_token.rb#L38
       @text = text
     end
 
-    attr :seek
-    attr :line_no
-    attr :char_no
+    attr_reader :seek
+    attr_reader :line_no
+    attr_reader :char_no
 
     attr_accessor :text
 
@@ -73,7 +73,7 @@ module RDoc::RubyToken https://github.com/ruby/ruby/blob/trunk/lib/rdoc/ruby_token.rb#L73
       @node = node
     end
 
-    attr :node
+    attr_reader :node
 
     def ==(other)
       self.class == other.class and
@@ -101,7 +101,7 @@ module RDoc::RubyToken https://github.com/ruby/ruby/blob/trunk/lib/rdoc/ruby_token.rb#L101
       super(seek, line_no, char_no)
       @name = name
     end
-    attr :name
+    attr_reader :name
 
     def ==(other)
       self.class == other.class and
@@ -192,7 +192,7 @@ module RDoc::RubyToken https://github.com/ruby/ruby/blob/trunk/lib/rdoc/ruby_token.rb#L192
       @text = nil
     end
 
-    attr :op
+    attr_reader :op
 
     def ==(other)
       self.class == other.class and
@@ -217,7 +217,7 @@ module RDoc::RubyToken https://github.com/ruby/ruby/blob/trunk/lib/rdoc/ruby_token.rb#L217
       super(seek, line_no, char_no)
       @name = name
     end
-    attr :name
+    attr_reader :name
 
     def ==(other)
       self.class == other.class and
Index: lib/net/telnet.rb
===================================================================
--- lib/net/telnet.rb	(revision 47297)
+++ lib/net/telnet.rb	(revision 47298)
@@ -371,7 +371,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/telnet.rb#L371
     # The socket the Telnet object is using.  Note that this object becomes
     # a delegate of the Telnet object, so normally you invoke its methods
     # directly on the Telnet object.
-    attr :sock
+    attr_reader :sock
 
     # Set telnet command interpretation on (+mode+ == true) or off
     # (+mode+ == false), or return the current value (+mode+ not
Index: lib/drb/drb.rb
===================================================================
--- lib/drb/drb.rb	(revision 47297)
+++ lib/drb/drb.rb	(revision 47298)
@@ -995,7 +995,7 @@ module DRb https://github.com/ruby/ruby/blob/trunk/lib/drb/drb.rb#L995
     def initialize(option)
       @option = option.to_s
     end
-    attr :option
+    attr_reader :option
     def to_s; @option; end
 
     def ==(other)

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

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