summaryrefslogtreecommitdiff
path: root/tool/generic_erb.rb
Commit message (Collapse)AuthorAgeFilesLines
* tool/generic_erb.rb: Add a hack to prevent "unused variable" warningsYusuke Endoh2022-11-181-0/+3
|
* Revert "tool/generic_erb.rb: Use ERB#result_with_hash instead of #result"Yusuke Endoh2022-11-181-1/+1
| | | | | | | | | | | This reverts commit bd148a2bdd0c1a4d7679eedcd649171cdb4234d7. ERB#result_with_hash does not work on Ruby 2.2 https://ci.appveyor.com/project/ruby/ruby/builds/45420170 ``` ../tool/generic_erb.rb:33:in `block (2 levels) in <main>': undefined method `result_with_hash' for #<ERB:0x0000000002516650> (NoMethodError) ```
* tool/generic_erb.rb: Use ERB#result_with_hash instead of #resultYusuke Endoh2022-11-181-1/+1
| | | | | | | | to prevent the warnings: ``` ./tool/generic_erb.rb:23: warning: assigned but unused variable - output ./tool/generic_erb.rb:24: warning: assigned but unused variable - vpath ```
* output.rb: extract from generic_erb.rbNobuyoshi Nakada2022-11-011-33/+8
| | | | | | | - writing to a file or stdout - touching timestamp files - overwriting only if changed - colorizing
* Revert "Extracted AtomicWrite"Nobuyoshi Nakada2021-03-131-5/+30
| | | | This reverts commit 2148ee78a5bc5e679903f5839c66578bfcf94a39, mistakenly committed.
* Extracted AtomicWriteNobuyoshi Nakada2021-03-131-30/+5
|
* Removed needless LOAD_PATH modification.Hiroshi SHIBATA2019-07-151-1/+0
| | | | We can use require_relative now.
* Move vpath.rb into tool library direcotry.Hiroshi SHIBATA2019-07-151-1/+1
|
* Put colorize to library directory.Hiroshi SHIBATA2019-07-151-1/+1
| | | | Same as 66299e7ca83d379d13abaa5411f3e0419334cabb
* Revert "Fix building with 1.8 BASERUBY"Jeremy Evans2019-05-291-3/+2
| | | | | | | | | This reverts commit 05bc14d81a1d7f6af826a92371aeff0c3fb2a67e. We have decided that the cost of reintroducing support for 1.8 BASERUBY outweighs the benefit. If you are still using 1.8 and want to build master/trunk, build and install the latest release, and use that as BASERUBY.
* Fix building with 1.8 BASERUBYJeremy Evans2019-05-271-2/+3
|
* generic_erb.rb: get rid of fileutilsnobu2018-05-151-2/+2
| | | | | | | | * tool/generic_erb.rb: get rid of FileUtils.touch, not to depend on fileutils.rb which will depend on rbconfig.rb which does not exist when creating encdb.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Refactor ERB version checking for keyword argumentsk0kubun2018-02-271-2/+1
| | | | | | Improving code like r62590. See r62529 for details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/generic_erb.rb: check ERB versionk0kubun2018-02-221-1/+2
| | | | | | | | | | | | | | | | | | | | | instead of Ruby's. When older ERB is installed but Ruby is still 2.6.0, this may cause error like: ``` Traceback (most recent call last): 5: from ../src/tool/generic_erb.rb:36:in `<main>' 4: from ../src/tool/generic_erb.rb:36:in `map' 3: from ../src/tool/generic_erb.rb:43:in `block in <main>' 2: from ../src/tool/generic_erb.rb:43:in `block (2 levels) in <main>' 1: from /opt/local/lib/ruby/2.6.0/erb.rb:873:in `result' /opt/local/lib/ruby/2.6.0/erb.rb:869:in `block in result': no implicit conversion of Hash into Integer (TypeError) ``` For safety, I changed this to check ERB's version. See also: r62529. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* erb.rb: deprecate safe_level of ERB.newk0kubun2018-02-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, as it's in the middle of the list of 4 arguments, 3rd and 4th arguments (trim_mode, eoutvar) are changed to keyword arguments. Old ways to specify arguments are deprecated and warned now. bin/erb: deprecate -S option. We'll remove all of deprecated ones at Ruby 2.7+. enc/make_encmake.rb: stopped using deprecated interface ext/etc/mkconstants.rb: ditto ext/socket/mkconstants.rb: ditto sample/ripper/ruby2html.rb: ditto spec/ruby/library/erb/defmethod/def_erb_method_spec.rb: ditto spec/ruby/library/erb/new_spec.rb: ditto test/erb/test_erb.rb: ditto test/erb/test_erb_command.rb: ditto tool/generic_erb.rb: ditto tool/ruby_vm/helpers/dumper.rb: ditto tool/transcode-tblgen.rb: ditto lib/rdoc/erbio.rb: ditto lib/rdoc/generator/darkfish.rb: ditto [Feature #14256] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generic_erb.rb: -i optionnobu2017-10-011-5/+10
| | | | | | * tool/generic_erb.rb: -i option to merge multiple template files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/extmk.rb: colorize notes [Feature #13302]nobu2017-04-211-11/+5
| | | | | | | | | | * common.mk (build-ext): pass variables to colorize. * ext/extmk.rb: colorize notes with tool/colorize.rb. * tool/colorize.rb: extract from tool/generic_erb.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warning: shadowing outer local variable - dir & optnaruse2017-03-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool: add descriptions and fix typosnormal2016-07-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tool/asm_parse.rb: add description * tool/change_maker.rb: ditto * tool/downloader.rb: ditto * tool/eval.rb: ditto * tool/expand-config.rb: ditto * tool/extlibs.rb: ditto * tool/fake.rb: ditto * tool/file2lastrev.rb: ditto * tool/gem-unpack.rb: ditto * tool/gen_dummy_probes.rb: ditto * tool/gen_ruby_tapset.rb: ditto * tool/generic_erb.rb: ditto * tool/id2token.rb: ditto * tool/ifchange: ditto * tool/insns2vm.rb: ditto * tool/instruction.rb: ditto * tool/jisx0208.rb: ditto * tool/merger.rb: ditto * tool/mkrunnable.rb: ditto * tool/node_name.rb: ditto * tool/parse.rb: ditto * tool/rbinstall.rb: ditto * tool/rbuninstall.rb: ditto * tool/rmdirs: ditto * tool/runruby.rb: ditto * tool/strip-rdoc.rb: ditto * tool/vcs.rb: ditto * tool/vtlh.rb: ditto * tool/ytab.sed: ditto * tool/enc-unicode.rb: fix typo * tool/mk_call_iseq_optimized.rb: ditto * tool/update-deps: ditto [ruby-core:76215] [Bug #12539] by Noah Gibbs <the.codefolio.guy@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ignore dump terminalnobu2015-10-311-1/+1
| | | | | | | * tool/generic_erb.rb, tool/ifchange: no colorization if tput returned nothing or dump terminal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* colorizenobu2015-10-221-2/+2
| | | | | | | | * tool/generic_erb.rb: use VT100 sequence if tput does not work. * tool/ifchange: ditto and add --color option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generic_erb.rb: ignore errornobu2015-10-221-1/+1
| | | | | | | * tool/generic_erb.rb: ignore error that tput is not found. [ruby-core:71143] [Bug #11611] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generic_erb.rb: highlightnobu2015-10-221-2/+15
| | | | | | * tool/generic_erb.rb: highlight result messages too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generic_erb.rb: read in binary modenobu2014-11-271-1/+1
| | | | | | | * tool/generic_erb.rb: read existing file in binary mode to convert nothing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generic_erb.rb: explicit_trim_linenobu2014-11-061-1/+1
| | | | | | * tool/generic_erb.rb: enable explicit_trim_line mode git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generic_erb.rb: --source optionnobu2013-05-161-1/+3
| | | | | | * tool/generic_erb.rb: -x, --source option for debug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/vpath.rbnobu2012-11-291-13/+5
| | | | | | | | | * tool/generic_erb.rb, tool/id2token.rb: add --path-separator option for mingw where make and built ruby live in different world. * tool/vpath.rb: extract from tool/instruction.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Drop executable bits of files that are not executable.knu2012-11-221-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* generic_erb.rb: --vpath optionnobu2012-08-251-1/+15
| | | | | | | * tool/generic_erb.rb (vpath.open): move --vpath option from template/id.h.tmpl. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/*: executable.nobu2009-06-301-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/generic_erb.rb: fixed typo.nobu2009-02-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/generic_erb.rb: sends the result to stdout if no output option.nobu2008-10-191-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (srcs): removed ID_H_TARGET.nobu2008-10-191-7/+5
| | | | | | | | | * tool/generic_erb.rb: always overwrites if no if-change option. * template/id.h.tmpl: shows which token differs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (ID_H_TARGET): phony target to update id.h.nobu2008-10-171-1/+31
| | | | | | | | | | | | * tool/ifchange, win32/ifchange.bat: --timestamp option added. * tool/generic_erb.rb: --timestamp, --output and --if-change options added. * template/id.h.tmpl: moved from id.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (Init_syserr): moved to the template.yugui2008-09-261-0/+4
(errno_missing): removed. fixed [ruby-dev:35958]. * defs/knwon_errors.def: added. extracted from Init_syserr. * templates/known_errors.inc.tmpl: added. Template for Init_syserr. c.f. [ruby-dev:35958]. * tools/generic_erb.rb: added. general purpose mapper which maps data+template into source code. * common.mk (error.$(OBJEXT), incs, known_errors.inc): Fixed dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e