1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Here document <<~ is Ruby 2.3 feature

baseruby should support wider ruby versions

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2018-01-09 15:41:10 +00:00
parent ab2c205c00
commit f5b459c2ed

View file

@ -22,67 +22,67 @@ end
def generate_parser def generate_parser
OptionParser.new do |this| OptionParser.new do |this|
this.on "-I", "--srcdir=DIR", <<~'end' this.on "-I", "--srcdir=DIR", <<'end'
Historically this option has been passed to the script. This is 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 beginnig the script was placed outside
of the ruby source tree. Decades passed since the merge of of the ruby source tree. Decades passed since the merge of
YARV, now I can safely assume this feature is obsolescent. Just YARV, now I can safely assume this feature is obsolescent. Just
ignore the passed value here. ignore the passed value here.
end end
this.on "-L", "--vpath=SPEC", <<~'end' this.on "-L", "--vpath=SPEC", <<'end'
Likewise, this option is no longer supported. Likewise, this option is no longer supported.
end end
this.on "--path-separator=SEP", /\A(?:\W\z|\.(\W).+)/, <<~'end' this.on "--path-separator=SEP", /\A(?:\W\z|\.(\W).+)/, <<'end'
Old script says this option is a "separator for vpath". I am Old script says this option is a "separator for vpath". I am
confident we no longer need this option. confident we no longer need this option.
end end
this.on "-Dname", "--enable=name[,name...]", Array, <<~'end' this.on "-Dname", "--enable=name[,name...]", Array, <<'end'
This option used to override VM option that is defined in This option used to override VM option that is defined in
vm_opts.h. Now it is officially unsupported because vm_opts.h to vm_opts.h. Now it is officially unsupported because vm_opts.h to
remain mismatched with this option must break things. Just edit remain mismatched with this option must break things. Just edit
vm_opts.h directly. vm_opts.h directly.
end end
this.on "-Uname", "--disable=name[,name...]", Array, <<~'end' this.on "-Uname", "--disable=name[,name...]", Array, <<'end'
This option used to override VM option that is defined in This option used to override VM option that is defined in
vm_opts.h. Now it is officially unsupported because vm_opts.h to vm_opts.h. Now it is officially unsupported because vm_opts.h to
remain mismatched with this option must break things. Just edit remain mismatched with this option must break things. Just edit
vm_opts.h directly. vm_opts.h directly.
end end
this.on "-i", "--insnsdef=FILE", "--instructions-def", <<~'end' this.on "-i", "--insnsdef=FILE", "--instructions-def", <<'end'
This option used to specify alternative path to insns.def. For This option used to specify alternative path to insns.def. For
the same reason to ignore -I, we no longer support this. the same reason to ignore -I, we no longer support this.
end end
this.on "-o", "--opt-operanddef=FILE", "--opt-operand-def", <<~'end' this.on "-o", "--opt-operanddef=FILE", "--opt-operand-def", <<'end'
This option used to specify alternative path to opt_operand.def. This option used to specify alternative path to opt_operand.def.
For the same reason to ignore -I, we no longer support this. For the same reason to ignore -I, we no longer support this.
end end
this.on "-u", "--opt-insnunifdef=FILE", "--opt-insn-unif-def", <<~'end' this.on "-u", "--opt-insnunifdef=FILE", "--opt-insn-unif-def", <<'end'
This option used to specify alternative path to This option used to specify alternative path to
opt_insn_unif.def. For the same reason to ignore -I, we no opt_insn_unif.def. For the same reason to ignore -I, we no
longer support this. longer support this.
end end
this.on "-C", "--[no-]use-const", <<~'end' this.on "-C", "--[no-]use-const", <<'end'
We use const whenever possible now so this option is ignored. We use const whenever possible now so this option is ignored.
The author believes that C compilers can constant-fold. The author believes that C compilers can constant-fold.
end end
this.on "-d", "--destdir", "--output-directory=DIR", <<~'begin' do |dir| this.on "-d", "--destdir", "--output-directory=DIR", <<'begin' do |dir|
THIS IS THE ONLY OPTION THAT WORKS today. Change destination THIS IS THE ONLY OPTION THAT WORKS today. Change destination
directory from the current working directory to the given path. directory from the current working directory to the given path.
begin begin
Dir.chdir dir Dir.chdir dir
end end
this.on "-V", "--[no-]verbose", <<~'end' this.on "-V", "--[no-]verbose", <<'end'
Please let us ignore this and be modest. Please let us ignore this and be modest.
end end
end end
end end