Skip to content

Commit 7eb1d60

Browse files
committed
Replaces match? with match to make code Ruby 2.3 compatible
1 parent b673d9f commit 7eb1d60

File tree

1 file changed

+3
-2
lines changed
  • lib/next_rails/bundle_report

1 file changed

+3
-2
lines changed

lib/next_rails/bundle_report/cli.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require "optparse"
44
require "next_rails"
55
require "next_rails/bundle_report"
6+
require 'byebug'
67

78
class NextRails::BundleReport::CLI
89
def initialize(argv)
@@ -21,11 +22,11 @@ def validate_arguments(argv)
2122
end
2223

2324
argv.each do |arg|
24-
if arg.start_with?("--rails-version") && !arg.match?(/--rails-version=+\d+(\.\d+)*$/)
25+
if arg.start_with?("--rails-version") && !/--rails-version=+\d+(\.\d+)*$/.match(arg)
2526
raise ArgumentError, "Invalid Rails version format. Example: --rails-version=5.0.7"
2627
end
2728

28-
if arg.start_with?("--ruby-version") && !arg.match?(/--ruby-version=+\d+(\.\d+)*$/)
29+
if arg.start_with?("--ruby-version") && !/--ruby-version=+\d+(\.\d+)*$/.match(arg)
2930
raise ArgumentError, "Invalid Ruby version format. Example: --ruby-version=3.3"
3031
end
3132
end

0 commit comments

Comments
 (0)