ruby2_keywords-0.0.2/0000755000004100000410000000000013631554225014541 5ustar www-datawww-dataruby2_keywords-0.0.2/README.md0000644000004100000410000000154413631554225016024 0ustar www-datawww-data# ruby2_keywords Provides empty `Module#ruby2_keywords` method, for the forward source-level compatibility against ruby2.7 and ruby3. ## Installation Add this line to your application's Gemfile: ```ruby gem 'ruby2_keywords' ``` And then execute: $ bundle Or install it yourself as: $ gem install ruby2_keywords ## Usage For class/module instance methods: ```ruby require 'ruby2_keywords' module YourModule ruby2_keywords def delegating_method(*args) other_method(*args) end end ``` For global methods: ```ruby require 'ruby2_keywords' ruby2_keywords def oldstyle_keywords(options = {}) end ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://bugs.ruby-lang.org. ## License The gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause). ruby2_keywords-0.0.2/lib/0000755000004100000410000000000013631554225015307 5ustar www-datawww-dataruby2_keywords-0.0.2/lib/ruby2_keywords.rb0000644000004100000410000000056513631554225020634 0ustar www-datawww-dataclass Module unless respond_to?(:ruby2_keywords, true) private def ruby2_keywords(name, *) # nil end end end main = TOPLEVEL_BINDING.receiver unless main.respond_to?(:ruby2_keywords, true) def main.ruby2_keywords(name, *) # nil end end class Proc unless method_defined?(:ruby2_keywords) def ruby2_keywords self end end end ruby2_keywords-0.0.2/ruby2_keywords.gemspec0000644000004100000410000000074513631554225021106 0ustar www-datawww-dataversion = IO.popen(%W[git -C #{__dir__} describe --tags --match v[0-9]*], &:read)[/\Av?(\d+(?:\.\d+)*)/, 1] Gem::Specification.new do |s| s.name = "ruby2_keywords" s.version = version s.summary = "Shim library for Module#ruby2_keywords" s.homepage = "https://github.com/ruby/ruby2_keywords" s.licenses = ["Ruby"] s.authors = ["Nobuyoshi Nakada"] s.require_paths = ["lib"] s.files = [ "README.md", "lib/ruby2_keywords.rb", "ruby2_keywords.gemspec", ] end