diff options
| author | Takeshi Watanabe <[email protected]> | 2019-12-14 00:39:54 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-05-24 22:34:28 +0900 |
| commit | 4ce3997ca4821394ed9ce572daace59383a62b41 (patch) | |
| tree | 4e88e8d922d43bc7ce3fedaa500f803bc5b652f2 /lib | |
| parent | 93e78fcde1d4b9b7e9e7d86eeace95df0907aa0e (diff) | |
| download | mruby-4ce3997ca4821394ed9ce572daace59383a62b41.tar.gz mruby-4ce3997ca4821394ed9ce572daace59383a62b41.zip | |
Start GitHub Actions; close #4903
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mruby/build.rb | 8 | ||||
| -rw-r--r-- | lib/mruby/source.rb | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/mruby/build.rb b/lib/mruby/build.rb index 8154b2b19..763334cf5 100644 --- a/lib/mruby/build.rb +++ b/lib/mruby/build.rb @@ -276,6 +276,14 @@ EOS end end + def cygwin_filename(name) + if name.is_a?(Array) + name.flatten.map { |n| cygwin_filename(n) } + else + `cygpath -w "#{filename(name)}"`.strip + end + end + def exefile(name) if name.is_a?(Array) name.flatten.map { |n| exefile(n) } diff --git a/lib/mruby/source.rb b/lib/mruby/source.rb index 5819a322b..a305c7b04 100644 --- a/lib/mruby/source.rb +++ b/lib/mruby/source.rb @@ -6,7 +6,9 @@ module MRuby 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'] |
