Skip to content

Commit 91a49fe

Browse files
authored
Merge pull request os97673#17 from niw/fix_regexp_to_match_directory_name
FIX: the regular expression that can be matched to the wrong position.
2 parents 9dd2104 + 28ca245 commit 91a49fe

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)