summaryrefslogtreecommitdiff
path: root/spec/ruby/core/module/attr_reader_spec.rb
diff options
context:
space:
mode:
authorRadosław Bułat <radek.bulat@gmail.com>2020-12-18 19:11:35 +0100
committerGitHub <noreply@github.com>2020-12-19 03:11:35 +0900
commit5944c4b3cfbbf8b774a4a76ca71ab9f71c71d1b0 (patch)
tree20ef7b2904d257f3344fff54517ec2cf717b5960 /spec/ruby/core/module/attr_reader_spec.rb
parentf6641d73764115c3f6bdf435a381711d894300b6 (diff)
attr_reader, attr_writer, attr_accessor and attr methods returns array of symbols (#3935)
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
Notes
Notes: Merged-By: mame <mame@ruby-lang.org>
Diffstat (limited to 'spec/ruby/core/module/attr_reader_spec.rb')
-rw-r--r--spec/ruby/core/module/attr_reader_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/module/attr_reader_spec.rb b/spec/ruby/core/module/attr_reader_spec.rb
index 238e3db9ea..0693909123 100644
--- a/spec/ruby/core/module/attr_reader_spec.rb
+++ b/spec/ruby/core/module/attr_reader_spec.rb
@@ -61,4 +61,10 @@ describe "Module#attr_reader" do
it "is a public method" do
Module.should have_public_instance_method(:attr_reader, false)
end
+
+ it "returns an array of defined methods names as symbols" do
+ Class.new do
+ (attr_reader :foo, 'bar').should == [:foo, :bar]
+ end
+ end
end