aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--lib/drb/drb.rb2
-rw-r--r--lib/irb/ruby-token.rb12
-rw-r--r--lib/net/telnet.rb2
-rw-r--r--lib/rdoc/ruby_token.rb14
-rw-r--r--lib/thwait.rb2
6 files changed, 25 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index d383935c0a..47f5a45912 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Wed Aug 27 21:08:20 2014 gogo tanaka <mail@tanakakazuki.com>
+
+ * 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@nifty.ne.jp>
* ext/win32ole/win32ole.c (vtdate2rbtime): try to convert millisecond
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index 25cf7e9c07..26f39b789f 100644
--- a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -995,7 +995,7 @@ module DRb
def initialize(option)
@option = option.to_s
end
- attr :option
+ attr_reader :option
def to_s; @option; end
def ==(other)
diff --git a/lib/irb/ruby-token.rb b/lib/irb/ruby-token.rb
index 52aebe7246..a80d81c9a5 100644
--- a/lib/irb/ruby-token.rb
+++ b/lib/irb/ruby-token.rb
@@ -24,14 +24,14 @@ module RubyToken
@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
super(seek, line_no, char_no)
@name = name
end
- attr :name
+ attr_reader :name
end
class TkVal < Token
@@ -47,7 +47,7 @@ module RubyToken
super(seek, line_no, char_no)
@value = value
end
- attr :value
+ attr_reader :value
end
class TkOp < Token
@@ -60,7 +60,7 @@ module RubyToken
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
super(seek, line_no, char_no)
@name = name
end
- attr :name
+ attr_reader :name
end
class TkError < Token
diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb
index 3c5d6e8e73..2260e7fb10 100644
--- a/lib/net/telnet.rb
+++ b/lib/net/telnet.rb
@@ -371,7 +371,7 @@ module Net
# 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
diff --git a/lib/rdoc/ruby_token.rb b/lib/rdoc/ruby_token.rb
index 8010475b92..81d3eb0b25 100644
--- a/lib/rdoc/ruby_token.rb
+++ b/lib/rdoc/ruby_token.rb
@@ -38,9 +38,9 @@ module RDoc::RubyToken
@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
@node = node
end
- attr :node
+ attr_reader :node
def ==(other)
self.class == other.class and
@@ -101,7 +101,7 @@ module RDoc::RubyToken
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
@text = nil
end
- attr :op
+ attr_reader :op
def ==(other)
self.class == other.class and
@@ -217,7 +217,7 @@ module RDoc::RubyToken
super(seek, line_no, char_no)
@name = name
end
- attr :name
+ attr_reader :name
def ==(other)
self.class == other.class and
diff --git a/lib/thwait.rb b/lib/thwait.rb
index 60f3911887..d9750a406b 100644
--- a/lib/thwait.rb
+++ b/lib/thwait.rb
@@ -55,7 +55,7 @@ class ThreadsWait
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.