Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit d8912f8

Browse files
committed
Avoid calling superclass.method
...in favour of using a lambda. This addresses #2008 But really, any third party code which causes problems with the original code is probably doing something a bit dodgy (e.g. overriding the `method` method on an object).
1 parent 02d759c commit d8912f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rspec/core/example_group.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def self.set_it_up(description, *args, &example_group_block)
409409

410410
@metadata = Metadata::ExampleGroupHash.create(
411411
superclass_metadata, user_metadata,
412-
superclass.method(:next_runnable_index_for),
412+
lambda { |file| superclass.next_runnable_index_for(file) },
413413
description, *args, &example_group_block
414414
)
415415
ExampleGroups.assign_const(self)

0 commit comments

Comments
 (0)