From 989540c9ccf89e4e2d837a123858ab420e5c4b6c Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 11 Nov 2021 17:34:43 +0900 Subject: [PATCH] Bump pp version to 0.2.1 --- lib/pp.gemspec | 13 ++++++++----- lib/pp.rb | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/pp.gemspec b/lib/pp.gemspec index f3f3527086..b81df28bee 100644 --- a/lib/pp.gemspec +++ b/lib/pp.gemspec @@ -1,21 +1,24 @@ Gem::Specification.new do |spec| spec.name = "pp" - spec.version = "0.1.0" + spec.version = "0.2.1" spec.authors = ["Tanaka Akira"] spec.email = ["akr@fsij.org"] spec.summary = %q{Provides a PrettyPrinter for Ruby objects} spec.description = %q{Provides a PrettyPrinter for Ruby objects} spec.homepage = "https://github.com/ruby/pp" - spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0") spec.licenses = ["Ruby", "BSD-2-Clause"] + spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0") + spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = spec.homepage - spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do - `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - end + spec.files = %w[ + LICENSE.txt + lib/pp.rb + pp.gemspec + ] spec.bindir = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] diff --git a/lib/pp.rb b/lib/pp.rb index ce282bee00..72480e5304 100644 --- a/lib/pp.rb +++ b/lib/pp.rb @@ -237,7 +237,7 @@ class PP < PrettyPrint else sep.call end - yield(*v, **{}) + RUBY_VERSION >= "3.0" ? yield(*v, **{}) : yield(*v) } end