summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/new_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/array/new_spec.rb')
-rw-r--r--spec/ruby/core/array/new_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/ruby/core/array/new_spec.rb b/spec/ruby/core/array/new_spec.rb
index 96ec6b8198..b50a4857b0 100644
--- a/spec/ruby/core/array/new_spec.rb
+++ b/spec/ruby/core/array/new_spec.rb
@@ -26,7 +26,9 @@ describe "Array.new with no arguments" do
end
it "does not use the given block" do
- ->{ Array.new { raise } }.should_not raise_error
+ -> {
+ -> { Array.new { raise } }.should_not raise_error
+ }.should complain(/warning: given block not used/, verbose: true)
end
end