From b9c5e2d96d55e932af71d1404d89dbca6962f5e6 Mon Sep 17 00:00:00 2001 From: ksss Date: Tue, 3 Mar 2026 09:50:08 +0900 Subject: [PATCH 1/2] Add RBS signature and testing --- .github/workflows/push_gem.yml | 2 + .github/workflows/sig.yml | 18 ++ .github/workflows/test.yml | 2 + Gemfile | 5 + Rakefile | 17 ++ sig/benchmark.rbs | 489 +++++++++++++++++++++++++++++++++ test_sig/test_benchmark.rb | 239 ++++++++++++++++ 7 files changed, 772 insertions(+) create mode 100644 .github/workflows/sig.yml create mode 100644 sig/benchmark.rbs create mode 100644 test_sig/test_benchmark.rb diff --git a/.github/workflows/push_gem.yml b/.github/workflows/push_gem.yml index 131e5bd..ce6d806 100644 --- a/.github/workflows/push_gem.yml +++ b/.github/workflows/push_gem.yml @@ -12,6 +12,8 @@ jobs: push: if: github.repository == 'ruby/benchmark' runs-on: ubuntu-latest + env: + BUNDLE_WITHOUT: sig environment: name: rubygems.org diff --git a/.github/workflows/sig.yml b/.github/workflows/sig.yml new file mode 100644 index 0000000..3cba09c --- /dev/null +++ b/.github/workflows/sig.yml @@ -0,0 +1,18 @@ +name: sig + +on: [push, pull_request] + +jobs: + sig: + runs-on: ubuntu-latest + env: + BUNDLE_WITH: sig + steps: + - uses: actions/checkout@v6 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ruby + - name: Run RBS tests + run: bundle exec rake rbs:test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4f99cc7..56f5aaa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,8 @@ jobs: test: needs: ruby-versions name: build (${{ matrix.ruby }} / ${{ matrix.os }}) + env: + BUNDLE_WITHOUT: sig strategy: matrix: ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} diff --git a/Gemfile b/Gemfile index 3dc2883..b8523ab 100644 --- a/Gemfile +++ b/Gemfile @@ -7,3 +7,8 @@ group :development do gem "rake" gem "test-unit" end + +group :sig do + gem "rbs" + gem "rdoc" +end diff --git a/Rakefile b/Rakefile index 8830e05..2ba85c0 100644 --- a/Rakefile +++ b/Rakefile @@ -6,3 +6,20 @@ Rake::TestTask.new(:test) do |t| end task :default => :test + +namespace :rbs do + Rake::TestTask.new(:test) do |t| + t.libs << "test_sig" + t.test_files = FileList["test_sig/test_*.rb"] + t.warning = true + end + + task :annotate do + require "tmpdir" + + Dir.mktmpdir do |tmpdir| + sh("rdoc --ri --output #{tmpdir}/doc --root=. lib") + sh("rbs annotate --no-system --no-gems --no-site --no-home -d #{tmpdir}/doc sig") + end + end +end diff --git a/sig/benchmark.rbs b/sig/benchmark.rbs new file mode 100644 index 0000000..7659ba5 --- /dev/null +++ b/sig/benchmark.rbs @@ -0,0 +1,489 @@ +# +# The Benchmark module provides methods to measure and report the time used to +# execute Ruby code. +# +# * Measure the time to construct the string given by the expression +# "a"*1_000_000_000: +# +# require 'benchmark' +# +# puts Benchmark.measure { "a"*1_000_000_000 } +# +# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: +# +# 0.350000 0.400000 0.750000 ( 0.835234) +# +# This report shows the user CPU time, system CPU time, the total time (sum +# of user CPU time, system CPU time, children's user CPU time, and +# children's system CPU time), and the elapsed real time. The unit of time +# is seconds. +# +# * Do some experiments sequentially using the #bm method: +# +# require 'benchmark' +# +# n = 5000000 +# Benchmark.bm do |x| +# x.report { for i in 1..n; a = "1"; end } +# x.report { n.times do ; a = "1"; end } +# x.report { 1.upto(n) do ; a = "1"; end } +# end +# +# The result: +# +# user system total real +# 1.010000 0.000000 1.010000 ( 1.014479) +# 1.000000 0.000000 1.000000 ( 0.998261) +# 0.980000 0.000000 0.980000 ( 0.981335) +# +# * Continuing the previous example, put a label in each report: +# +# require 'benchmark' +# +# n = 5000000 +# Benchmark.bm(7) do |x| +# x.report("for:") { for i in 1..n; a = "1"; end } +# x.report("times:") { n.times do ; a = "1"; end } +# x.report("upto:") { 1.upto(n) do ; a = "1"; end } +# end +# +# The result: +# +# user system total real +# for: 1.010000 0.000000 1.010000 ( 1.015688) +# times: 1.000000 0.000000 1.000000 ( 1.003611) +# upto: 1.030000 0.000000 1.030000 ( 1.028098) +# +# * The times for some benchmarks depend on the order in which items are run. +# These differences are due to the cost of memory allocation and garbage +# collection. To avoid these discrepancies, the #bmbm method is provided. +# For example, to compare ways to sort an array of floats: +# +# require 'benchmark' +# +# array = (1..1000000).map { rand } +# +# Benchmark.bmbm do |x| +# x.report("sort!") { array.dup.sort! } +# x.report("sort") { array.dup.sort } +# end +# +# The result: +# +# Rehearsal ----------------------------------------- +# sort! 1.490000 0.010000 1.500000 ( 1.490520) +# sort 1.460000 0.000000 1.460000 ( 1.463025) +# -------------------------------- total: 2.960000sec +# +# user system total real +# sort! 1.460000 0.000000 1.460000 ( 1.460465) +# sort 1.450000 0.010000 1.460000 ( 1.448327) +# +# * Report statistics of sequential experiments with unique labels, using the +# #benchmark method: +# +# require 'benchmark' +# include Benchmark # we need the CAPTION and FORMAT constants +# +# n = 5000000 +# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| +# tf = x.report("for:") { for i in 1..n; a = "1"; end } +# tt = x.report("times:") { n.times do ; a = "1"; end } +# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } +# [tf+tt+tu, (tf+tt+tu)/3] +# end +# +# The result: +# +# user system total real +# for: 0.950000 0.000000 0.950000 ( 0.952039) +# times: 0.980000 0.000000 0.980000 ( 0.984938) +# upto: 0.950000 0.000000 0.950000 ( 0.946787) +# >total: 2.880000 0.000000 2.880000 ( 2.883764) +# >avg: 0.960000 0.000000 0.960000 ( 0.961255) +# +module Benchmark + # + # Invokes the block with a Benchmark::Report object, which may be used to + # collect and report on the results of individual benchmark tests. Reserves + # `label_width` leading spaces for labels on each line. Prints `caption` at the + # top of the report, and uses `format` to format each line. (Note: `caption` + # must contain a terminating newline character, see the default + # Benchmark::Tms::CAPTION for an example.) + # + # Returns an array of Benchmark::Tms objects. + # + # If the block returns an array of Benchmark::Tms objects, these will be used to + # format additional lines of output. If `labels` parameter are given, these are + # used to label these extra lines. + # + # *Note*: Other methods provide a simpler interface to this one, and are + # suitable for nearly all benchmarking requirements. See the examples in + # Benchmark, and the #bm and #bmbm methods. + # + # Example: + # + # require 'benchmark' + # include Benchmark # we need the CAPTION and FORMAT constants + # + # n = 5000000 + # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| + # tf = x.report("for:") { for i in 1..n; a = "1"; end } + # tt = x.report("times:") { n.times do ; a = "1"; end } + # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # [tf+tt+tu, (tf+tt+tu)/3] + # end + # + # Generates: + # + # user system total real + # for: 0.970000 0.000000 0.970000 ( 0.970493) + # times: 0.990000 0.000000 0.990000 ( 0.989542) + # upto: 0.970000 0.000000 0.970000 ( 0.972854) + # >total: 2.930000 0.000000 2.930000 ( 2.932889) + # >avg: 0.976667 0.000000 0.976667 ( 0.977630) + # + def self?.benchmark: (String caption, ?Integer? label_width, ?String? format, *String labels) { (Report report) -> (Array[Tms] | untyped) } -> Array[Tms] + + # + # A simple interface to the #benchmark method, #bm generates sequential reports + # with labels. `label_width` and `labels` parameters have the same meaning as + # for #benchmark. + # + # require 'benchmark' + # + # n = 5000000 + # Benchmark.bm(7) do |x| + # x.report("for:") { for i in 1..n; a = "1"; end } + # x.report("times:") { n.times do ; a = "1"; end } + # x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # end + # + # Generates: + # + # user system total real + # for: 0.960000 0.000000 0.960000 ( 0.957966) + # times: 0.960000 0.000000 0.960000 ( 0.960423) + # upto: 0.950000 0.000000 0.950000 ( 0.954864) + # + def self?.bm: (?Integer label_width, *String labels) { (Report report) -> void } -> Array[Tms] + + # + # Sometimes benchmark results are skewed because code executed earlier + # encounters different garbage collection overheads than that run later. #bmbm + # attempts to minimize this effect by running the tests twice, the first time as + # a rehearsal in order to get the runtime environment stable, the second time + # for real. GC.start is executed before the start of each of the real timings; + # the cost of this is not included in the timings. In reality, though, there's + # only so much that #bmbm can do, and the results are not guaranteed to be + # isolated from garbage collection and other effects. + # + # Because #bmbm takes two passes through the tests, it can calculate the + # required label width. + # + # require 'benchmark' + # + # array = (1..1000000).map { rand } + # + # Benchmark.bmbm do |x| + # x.report("sort!") { array.dup.sort! } + # x.report("sort") { array.dup.sort } + # end + # + # Generates: + # + # Rehearsal ----------------------------------------- + # sort! 1.440000 0.010000 1.450000 ( 1.446833) + # sort 1.440000 0.000000 1.440000 ( 1.448257) + # -------------------------------- total: 2.890000sec + # + # user system total real + # sort! 1.460000 0.000000 1.460000 ( 1.458065) + # sort 1.450000 0.000000 1.450000 ( 1.455963) + # + # #bmbm yields a Benchmark::Job object and returns an array of Benchmark::Tms + # objects. + # + def self?.bmbm: (?Integer width) { (Job job) -> void } -> Array[Tms] + + # + # Returns the time used to execute the given block as a Benchmark::Tms object. + # Takes `label` option. + # + # require 'benchmark' + # + # n = 1000000 + # + # time = Benchmark.measure do + # n.times { a = "1" } + # end + # puts time + # + # Generates: + # + # 0.220000 0.000000 0.220000 ( 0.227313) + # + def self?.measure: (?String label) { () -> void } -> Tms + + # + # Returns the elapsed real time used to execute the given block. The unit of + # time is seconds. + # + # Benchmark.realtime { "a" * 1_000_000_000 } + # #=> 0.5098029999935534 + # + def self?.realtime: () { () -> void } -> Float + + # + # Returns the elapsed real time used to execute the given block. The unit of + # time is milliseconds. + # + # Benchmark.ms { "a" * 1_000_000_000 } + # #=> 509.8029999935534 + # + def self?.ms: () { () -> void } -> Float + + BENCHMARK_VERSION: String + + # + # The default caption string (heading above the output times). + # + CAPTION: String + + # + # The default format string used to display times. See also + # Benchmark::Tms#format. + # + FORMAT: String + + class Job + def initialize: (Integer width) -> void + + # Prints the `label` and measured time for the block, + # formatted by `format`. See Tms#format for the + # formatting rules. + def item: (?String label) { () -> void } -> self + + # An array of 2-element arrays, consisting of label and block pairs. + def list: () -> Array[untyped] + + alias report item + + # Length of the widest label in the #list. + def width: () -> Integer + end + + class Report + attr_reader width: Integer + attr_reader format: nil + attr_reader list: Array[Tms] + + def initialize: (?Integer width, ?String? format) -> void + + # Prints the `label` and measured time for the block, + # formatted by `format`. See Tms#format for the + # formatting rules. + def item: (?String label, *untyped format) { () -> void } -> Tms + + alias report item + end + + # + # A data object, representing the times associated with a benchmark measurement. + # + class Tms + # + # Returns an initialized Tms object which has `utime` as the user CPU time, + # `stime` as the system CPU time, `cutime` as the children's user CPU time, + # `cstime` as the children's system CPU time, `real` as the elapsed real time + # and `label` as the label. + # + def initialize: (?Float utime, ?Float stime, ?Float cutime, ?Float cstime, ?Float real, ?String label) -> void + + # + # User CPU time + # + attr_reader utime: Float + + # + # System CPU time + # + attr_reader stime: Float + + # + # User CPU time of children + # + attr_reader cutime: Float + + # + # System CPU time of children + # + attr_reader cstime: Float + + # + # Elapsed real time + # + attr_reader real: Float + + # + # Total time, that is `utime` + `stime` + `cutime` + `cstime` + # + attr_reader total: Float + + # + # Label + # + attr_reader label: String + + # + # Returns a new Tms object obtained by memberwise multiplication of the + # individual times for this Tms object by `x`. + # + def *: (untyped x) -> untyped + + # + # Returns a new Tms object obtained by memberwise summation of the individual + # times for this Tms object with those of the `other` Tms object. This method + # and #/() are useful for taking statistics. + # + def +: (untyped other) -> untyped + + # + # Returns a new Tms object obtained by memberwise subtraction of the individual + # times for the `other` Tms object from those of this Tms object. + # + def -: (untyped other) -> untyped + + # + # Returns a new Tms object obtained by memberwise division of the individual + # times for this Tms object by `x`. This method and #+() are useful for taking + # statistics. + # + def /: (untyped x) -> untyped + + # + # Returns a new Tms object whose times are the sum of the times for this Tms + # object, plus the time required to execute the code block (`blk`). + # + def add: () { (*untyped) -> untyped } -> untyped + + # + # An in-place version of #add. Changes the times of this Tms object by making it + # the sum of the times for this Tms object, plus the time required to execute + # the code block (`blk`). + # + def add!: () { (*untyped) -> untyped } -> untyped + + # + # Returns the contents of this Tms object as a formatted string, according to a + # `format` string like that passed to Kernel.format. In addition, #format + # accepts the following extensions: + # + # %u + # : Replaced by the user CPU time, as reported by Tms#utime. + # + # %y + # : Replaced by the system CPU time, as reported by Tms#stime (Mnemonic: y of + # "s*y*stem") + # + # %U + # : Replaced by the children's user CPU time, as reported by Tms#cutime + # + # %Y + # : Replaced by the children's system CPU time, as reported by Tms#cstime + # + # %t + # : Replaced by the total CPU time, as reported by Tms#total + # + # %r + # : Replaced by the elapsed real time, as reported by Tms#real + # + # %n + # : Replaced by the label string, as reported by Tms#label (Mnemonic: n of + # "*n*ame") + # + # + # If `format` is not given, FORMAT is used as default value, detailing the user, + # system, total and real elapsed time. + # + def format: (?String? format, *untyped args) -> String + + # + # Returns a new 6-element array, consisting of the label, user CPU time, system + # CPU time, children's user CPU time, children's system CPU time and elapsed + # real time. + # + def to_a: () -> [ String, Float, Float, Float, Float, Float ] + + # + # Returns a hash containing the same data as `to_a`. + # + def to_h: () -> { label: String, utime: Float, stime: Float, cutime: Float, cstime: Float, real: Float } + + # + # Same as #format. + # + def to_s: () -> String + + # + # Default caption, see also Benchmark::CAPTION + # + CAPTION: String + + # + # Default format string, see also Benchmark::FORMAT + # + FORMAT: String + end +end diff --git a/test_sig/test_benchmark.rb b/test_sig/test_benchmark.rb new file mode 100644 index 0000000..7902708 --- /dev/null +++ b/test_sig/test_benchmark.rb @@ -0,0 +1,239 @@ +# frozen_string_literal: true + +require "test/unit" +require "rbs/unit_test" +require "benchmark" + +class TestBenchmarkModuleSignature < Test::Unit::TestCase + include RBS::UnitTest::TypeAssertions + library "benchmark" + testing "singleton(::Benchmark)" + + def test_constants + assert_const_type "::String", "Benchmark::BENCHMARK_VERSION" + assert_const_type "::String", "Benchmark::CAPTION" + assert_const_type "::String", "Benchmark::FORMAT" + end + + def test_bm + suppress_stdout do + assert_send_type "() { (Benchmark::Report) -> void } -> ::Array[::Benchmark::Tms]", + Benchmark, :bm do |r| r end + assert_send_type "(Integer) { (Benchmark::Report) -> void } -> ::Array[::Benchmark::Tms]", + Benchmark, :bm, 1 do |r| r end + assert_send_type "(Integer, String, String) { (Benchmark::Report) -> void } -> ::Array[::Benchmark::Tms]", + Benchmark, :bm, 1, "x", "y" do |r| r end + end + end + + def test_bmbm + suppress_stdout do + assert_send_type "() { (Benchmark::Job) -> void } -> ::Array[::Benchmark::Tms]", + Benchmark, :bmbm do |j| j end + assert_send_type "(Integer) { (Benchmark::Job) -> void } -> ::Array[::Benchmark::Tms]", + Benchmark, :bmbm, 1 do |j| j end + end + end + + def test_measure + assert_send_type "(?::String label) { () -> untyped } -> ::Benchmark::Tms", + Benchmark, :measure, "x" do end + end + + def test_realtime + assert_send_type "{ () -> untyped } -> ::Float", + Benchmark, :realtime do end + end + + def test_ms + assert_send_type "() { () -> untyped } -> ::Float", + Benchmark, :ms do end + end + + def suppress_stdout + stdout = $stdout + File.open(IO::NULL, "w") do |io| + $stdout = io + yield + end + ensure + $stdout = stdout + end +end + +class TestBenchmarkJobSignature < Test::Unit::TestCase + include RBS::UnitTest::TypeAssertions + library "benchmark" + testing "::Benchmark::Job" + + def test_initialize + assert_send_type "(Integer width) -> void", + Benchmark::Job.allocate, :initialize, 1 + end + + def test_item + job = Benchmark::Job.new(1) + assert_send_type("(?untyped label) { () -> untyped } -> ::Benchmark::Job", + job, :item, "report") { 1 + 1 } + assert_send_type("(?untyped label) { () -> untyped } -> ::Benchmark::Job", + job, :report, "report") { 1 + 1 } + end + + def test_list + job = Benchmark::Job.new(1) + assert_send_type "() -> ::Array[untyped]", job, :list + end + + def test_width + job = Benchmark::Job.new(1) + assert_send_type "() -> ::Integer", job, :width + end +end + +class TestBenchmarkReportSignature < Test::Unit::TestCase + include RBS::UnitTest::TypeAssertions + library "benchmark" + testing "::Benchmark::Report" + + def test_initialize + assert_send_type "() -> void", + Benchmark::Report.allocate, :initialize + assert_send_type "(Integer width) -> void", + Benchmark::Report.allocate, :initialize, 1 + assert_send_type "(Integer width, String format) -> void", + Benchmark::Report.allocate, :initialize, 1, "x" + end + + def test_item + report = Benchmark::Report.new + assert_send_type("() { () -> untyped } -> ::Benchmark::Tms", + report, :item) { } + assert_send_type("(String label) { () -> untyped } -> ::Benchmark::Tms", + report, :report, "report") { } + assert_send_type("(String label, String format) { () -> untyped } -> ::Benchmark::Tms", + report, :report, "report", "format") { } + end + + def test_width + report = Benchmark::Report.new + assert_send_type "() -> ::Integer", report, :width + end + + def test_format + report = Benchmark::Report.new + assert_send_type "() -> nil", report, :format + end + + def test_list + report = Benchmark::Report.new + assert_send_type "() -> ::Array[::Benchmark::Tms]", report, :list + end +end + +class TestBenchmarkTmsSignature < Test::Unit::TestCase + include RBS::UnitTest::TypeAssertions + library "benchmark" + testing "::Benchmark::Tms" + + def test_initialize + assert_send_type "() -> void", + Benchmark::Tms.allocate, :initialize + assert_send_type "(Float utime) -> void", + Benchmark::Tms.allocate, :initialize, 1.0 + assert_send_type "(Float utime, Float stime) -> void", + Benchmark::Tms.allocate, :initialize, 1.0, 2.0 + assert_send_type "(Float utime, Float stime, Float cutime) -> void", + Benchmark::Tms.allocate, :initialize, 1.0, 2.0, 3.0 + assert_send_type "(Float utime, Float stime, Float cutime, Float cstime) -> void", + Benchmark::Tms.allocate, :initialize, 1.0, 2.0, 3.0, 4.0 + assert_send_type "(Float utime, Float stime, Float cutime, Float cstime, Float real) -> void", + Benchmark::Tms.allocate, :initialize, 1.0, 2.0, 3.0, 4.0, 5.0 + assert_send_type "(Float utime, Float stime, Float cutime, Float cstime, Float real, String label) -> void", + Benchmark::Tms.allocate, :initialize, 1.0, 2.0, 3.0, 4.0, 5.0, "label" + end + + def test_utime + assert_send_type "() -> ::Float", Benchmark::Tms.new, :utime + end + + def test_stime + assert_send_type "() -> ::Float", Benchmark::Tms.new, :stime + end + + def test_cutime + assert_send_type "() -> ::Float", Benchmark::Tms.new, :cutime + end + + def test_cstime + assert_send_type "() -> ::Float", Benchmark::Tms.new, :cstime + end + + def test_real + assert_send_type "() -> ::Float", Benchmark::Tms.new, :real + end + + def test_total + assert_send_type "() -> ::Float", Benchmark::Tms.new, :total + end + + def test_label + assert_send_type "() -> ::String", Benchmark::Tms.new, :label + end + + def test_multiply + tms = Benchmark::Tms.new + assert_send_type "(::Benchmark::Tms) -> ::Benchmark::Tms", tms, :*, tms + assert_send_type "(Float) -> ::Benchmark::Tms", tms, :*, 2.0 + end + + def test_plus + tms = Benchmark::Tms.new + assert_send_type "(::Benchmark::Tms) -> ::Benchmark::Tms", tms, :+, tms + assert_send_type "(Float) -> ::Benchmark::Tms", tms, :+, 2.0 + end + + def test_minus + tms = Benchmark::Tms.new + assert_send_type "(::Benchmark::Tms) -> ::Benchmark::Tms", tms, :-, tms + assert_send_type "(Float) -> ::Benchmark::Tms", tms, :-, 2.0 + end + + def test_divide + tms = Benchmark::Tms.new + assert_send_type "(::Benchmark::Tms) -> ::Benchmark::Tms", tms, :/, tms + assert_send_type "(Float) -> ::Benchmark::Tms", tms, :/, 2.0 + end + + def test_add + assert_send_type "() { () -> untyped } -> ::Benchmark::Tms", + Benchmark::Tms.new, :add do end + end + + def test_add! + assert_send_type "() { () -> untyped } -> ::Benchmark::Tms", + Benchmark::Tms.new, :add! do end + end + + def test_format + tms = Benchmark::Tms.new + assert_send_type "() -> ::String", tms, :format + assert_send_type "(nil) -> ::String", tms, :format, nil + assert_send_type "(String) -> ::String", tms, :format, "format" + assert_send_type "(String, Float) -> ::String", tms, :format, "format", 1.0 + end + + def test_to_a + assert_send_type "() -> [::String, ::Float, ::Float, ::Float, ::Float, ::Float]", + Benchmark::Tms.new, :to_a + end + + def test_to_h + assert_send_type "() -> { label: String, utime: Float, stime: Float, cutime: Float, cstime: Float, real: Float }", + Benchmark::Tms.new, :to_h + end + + def test_constants + assert_const_type "::String", "Benchmark::Tms::CAPTION" + assert_const_type "::String", "Benchmark::Tms::FORMAT" + end +end From 0b012bbfd7f170a5c694e528b5a4ac887aac8dce Mon Sep 17 00:00:00 2001 From: ksss Date: Tue, 3 Mar 2026 10:52:14 +0900 Subject: [PATCH 2/2] Except test_sig dir in gem package --- benchmark.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark.gemspec b/benchmark.gemspec index 5d071c9..9bb92dd 100644 --- a/benchmark.gemspec +++ b/benchmark.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |spec| # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do - `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|test_sig)/}) } end spec.bindir = "exe" spec.executables = []