module RSpec::Support::WithKeywordsWhenNeeded
Public Instance Methods
Remove this in RSpec
4 in favour of explicitly passed in kwargs where this is used. Works around a warning in Ruby
2.7
# File rspec-support/lib/rspec/support/with_keywords_when_needed.rb, line 17 def class_exec(klass, *args, &block) if MethodSignature.new(block).has_kw_args_in?(args) binding.eval(<<-CODE, __FILE__, __LINE__) kwargs = args.pop klass.class_exec(*args, **kwargs, &block) CODE else klass.class_exec(*args, &block) end end