Merge pull request #6529 from mruby/dependabot/github_actions/super-linter/super...
[mruby.git] / lib / mruby / source.rb
index 5819a32..ce9e558 100644 (file)
@@ -2,11 +2,13 @@ require "pathname"
 
 module MRuby
   module Source
-    # MRuby's source root directory
+    # mruby's source root directory
     ROOT = Pathname.new(File.expand_path('../../../',__FILE__))
 
     # Reads a constant defined at version.h
-    MRUBY_READ_VERSION_CONSTANT = Proc.new { |name| ROOT.join('include','mruby','version.h').read.match(/^#define #{name} +"?([\w\. ]+)"?$/)[1] }
+    MRUBY_READ_VERSION_CONSTANT = Proc.new do |name|
+      ROOT.join('include','mruby','version.h').read.match(/^#define #{name} +"?([\w\. ]+)"?\r?$/)[1]
+    end
 
     MRUBY_RUBY_VERSION = MRUBY_READ_VERSION_CONSTANT['MRUBY_RUBY_VERSION']
     MRUBY_RUBY_ENGINE = MRUBY_READ_VERSION_CONSTANT['MRUBY_RUBY_ENGINE']