From 2340d5e7eaafc6fe08ae58437bf6d4f5b9250ad2 Mon Sep 17 00:00:00 2001 From: hsbt Date: Wed, 10 Jan 2018 01:00:21 +0000 Subject: Fixed typos. * tool/ruby_vm/loaders/opt_operand_def.rb: grammer -> grammar * tool/ruby_vm/scripts/insns2vm.rb: beginnig -> beginning git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/ruby_vm/loaders/opt_operand_def.rb | 8 ++++---- tool/ruby_vm/scripts/insns2vm.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tool/ruby_vm') diff --git a/tool/ruby_vm/loaders/opt_operand_def.rb b/tool/ruby_vm/loaders/opt_operand_def.rb index 18bcf7d441..5c94b4bced 100644 --- a/tool/ruby_vm/loaders/opt_operand_def.rb +++ b/tool/ruby_vm/loaders/opt_operand_def.rb @@ -15,7 +15,7 @@ require_relative '../helpers/scanner' json = [] scanner = RubyVM::Scanner.new '../../../defs/opt_operand.def' path = scanner.__FILE__ -grammer = %r/ +grammar = %r/ (? \# .+? \n ){0} (? \g | \s ){0} (? \w+ ){0} @@ -30,15 +30,15 @@ grammer = %r/ until scanner.eos? do break if scanner.scan(/ ^ __END__ $ /x) - next if scanner.scan(/#{grammer} \g+ /ox) + next if scanner.scan(/#{grammar} \g+ /ox) - line = scanner.scan!(/#{grammer} \g /mox) + line = scanner.scan!(/#{grammar} \g /mox) insn = scanner["insn"] args = scanner["args"] ary = [] until args.strip.empty? do tmp = StringScanner.new args - tmp.scan(/#{grammer} \g /mox) + tmp.scan(/#{grammar} \g /mox) ary << tmp["arg"] args = tmp["remain"] break unless args diff --git a/tool/ruby_vm/scripts/insns2vm.rb b/tool/ruby_vm/scripts/insns2vm.rb index 8acbe94104..1083e42b8e 100644 --- a/tool/ruby_vm/scripts/insns2vm.rb +++ b/tool/ruby_vm/scripts/insns2vm.rb @@ -24,7 +24,7 @@ def generate_parser OptionParser.new do |this| this.on "-I", "--srcdir=DIR", <<'end' Historically this option has been passed to the script. This is - supposedly because at the beginnig the script was placed outside + supposedly because at the beginning the script was placed outside of the ruby source tree. Decades passed since the merge of YARV, now I can safely assume this feature is obsolescent. Just ignore the passed value here. -- cgit v1.2.3