summaryrefslogtreecommitdiff
path: root/spec/ruby/core/struct/deconstruct_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/struct/deconstruct_spec.rb')
-rw-r--r--spec/ruby/core/struct/deconstruct_spec.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/spec/ruby/core/struct/deconstruct_spec.rb b/spec/ruby/core/struct/deconstruct_spec.rb
index 7518a40987..aad82ac2ba 100644
--- a/spec/ruby/core/struct/deconstruct_spec.rb
+++ b/spec/ruby/core/struct/deconstruct_spec.rb
@@ -1,12 +1,7 @@
require_relative '../../spec_helper'
-ruby_version_is "2.7" do
- describe "Struct#deconstruct" do
- it "returns an array of attribute values" do
- struct = Struct.new(:x, :y)
- s = struct.new(1, 2)
-
- s.deconstruct.should == [1, 2]
- end
+describe "Struct#deconstruct" do
+ it "is an alias of Struct#to_a" do
+ Struct.instance_method(:deconstruct).should == Struct.instance_method(:to_a)
end
end