Skip to content

Commit

Permalink
Condition use of ruby2_keywords to avoid introducing gem dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Blake committed Mar 25, 2021
1 parent 29db314 commit 6998a6f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions lib/sinatra/base.rb
Expand Up @@ -8,7 +8,6 @@
require 'mustermann'
require 'mustermann/sinatra'
require 'mustermann/regular'
require 'ruby2_keywords'

# stdlib dependencies
require 'thread'
Expand Down Expand Up @@ -1950,7 +1949,7 @@ def self.delegate(*methods)
Delegator.target.send(method_name, *args, &block)
end
# ensure keyword argument passing is compatible with ruby >= 2.7
ruby2_keywords method_name
ruby2_keywords(method_name) if respond_to?(:ruby2_keywords, true)
private method_name
end
end
Expand Down
1 change: 0 additions & 1 deletion sinatra.gemspec
Expand Up @@ -47,5 +47,4 @@ EOF
s.add_dependency 'tilt', '~> 2.0'
s.add_dependency 'rack-protection', version
s.add_dependency 'mustermann', '~> 1.0'
s.add_dependency 'ruby2_keywords', '~> 0.0.4'
end

0 comments on commit 6998a6f

Please sign in to comment.