Skip to content

Commit

Permalink
Change to Proc.new to make Ruby 1.9 Happy
Browse files Browse the repository at this point in the history
  • Loading branch information
sagmor committed Sep 7, 2015
1 parent 9d0c49f commit 1c8576d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mruby/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Source
ROOT = Pathname.new(File.expand_path('../../../',__FILE__))

# Reads a constant defined at version.h
MRUBY_READ_VERSION_CONSTANT = -> (name) { ROOT.join('include','mruby','version.h').read.match(/^#define #{name} +"?([\w\. ]+)"?$/)[1] }
MRUBY_READ_VERSION_CONSTANT = Proc.new { |name| ROOT.join('include','mruby','version.h').read.match(/^#define #{name} +"?([\w\. ]+)"?$/)[1] }

MRUBY_RUBY_VERSION = MRUBY_READ_VERSION_CONSTANT['MRUBY_RUBY_VERSION']
MRUBY_RUBY_ENGINE = MRUBY_READ_VERSION_CONSTANT['MRUBY_RUBY_ENGINE']
Expand Down

0 comments on commit 1c8576d

Please sign in to comment.