Skip to content

Commit 28ca245

Browse files
committed
FIX: regular expression that can be matched to wrong position.
1 parent 333e49f commit 28ca245

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/debase/ruby_core_source.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def self.deduce_packaged_source_dir(ruby_dir)
6868
end
6969

7070
def self.ruby_source_dir_version(dir)
71-
match = /ruby-([0-9\.]+)-(.+)/.match(dir)
71+
match = /ruby-([0-9\.]+)-((p|rc)[0-9]+)\z/.match(dir)
7272
Gem::Version.new("#{match[1]}.#{match[2]}")
7373
end
7474

0 commit comments

Comments
 (0)