[ruby-cvs:69712] k0kubun:r62531 (trunk): tool/generic_erb.rb: check ERB version

k0kubun at ruby-lang.org k0kubun at ruby-lang.org
Fri Feb 23 00:03:08 JST 2018


k0kubun	2018-02-23 00:03:08 +0900 (Fri, 23 Feb 2018)

  New Revision: 62531

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62531

  Log:
    tool/generic_erb.rb: check ERB version
    
    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.

  Modified files:
    trunk/tool/generic_erb.rb


More information about the ruby-cvs mailing list