diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb index 25cf7e9..26f39b7 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 52aebe7..a80d81c 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 3c5d6e8..2260e7f 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 8010475..81d3eb0 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 60f3911..d9750a4 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.