diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-12 08:38:11 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-12 08:38:11 +0000 |
commit | 8a72c77c7920d129818b7b83bb4fa669cd7e3f7d (patch) | |
tree | e88e17811fdb1059cc3a63199c297582780c8497 /tool/ruby_vm/loaders/vm_opts_h.rb | |
parent | 069e9ff52cbb01fe2c5821a9b6a8077ab59c26c7 (diff) |
tool/ruby_vm support for pre-2.1 BASERUBY
as requested by devs, support for BASERUBY prior to 2.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ruby_vm/loaders/vm_opts_h.rb')
-rw-r--r-- | tool/ruby_vm/loaders/vm_opts_h.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/ruby_vm/loaders/vm_opts_h.rb b/tool/ruby_vm/loaders/vm_opts_h.rb index f898fb36a4..d28db4eaa2 100644 --- a/tool/ruby_vm/loaders/vm_opts_h.rb +++ b/tool/ruby_vm/loaders/vm_opts_h.rb @@ -18,14 +18,14 @@ grammar = %r/ (?<ws> \u0020 ){0} (?<key> \w+ ){0} (?<value> 0|1 ){0} - (?<define> \#define \g<ws>+ OPT_\g<key> \g<ws>+ \g<value> \g<ws>*\n ) + (?<define> \G \#define \g<ws>+ OPT_\g<key> \g<ws>+ \g<value> \g<ws>*\n ) /mx until scanner.eos? do if scanner.scan grammar then json[scanner['key']] = ! scanner['value'].to_i.zero? # not nonzero? else - scanner.scan(/.*\n/) + scanner.scan(/\G.*\n/) end end |