ruby-changes:44440
From: nobu <ko1@a...>
Date: Fri, 28 Oct 2016 23:18:58 +0900 (JST)
Subject: [ruby-changes:44440] nobu:r56513 (trunk): single_byte.trans: dead code
nobu 2016-10-28 23:18:52 +0900 (Fri, 28 Oct 2016) New Revision: 56513 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56513 Log: single_byte.trans: dead code * enc/trans/single_byte.trans (transcode_tblgen_singlebyte): remove useless code. returned value is not used. Modified files: trunk/enc/trans/single_byte.trans Index: enc/trans/single_byte.trans =================================================================== --- enc/trans/single_byte.trans (revision 56512) +++ enc/trans/single_byte.trans (revision 56513) @@ -18,15 +18,12 @@ https://github.com/ruby/ruby/blob/trunk/enc/trans/single_byte.trans#L18 # file name: lower case, hyphens, -tbl.rb suffix (e.g. iso-8859-3-tbl.rb) # variable name: UPPER case, underscores, _TO_UCS_TBL suffix (e.g. ISO_8859_3_TO_UCS_TBL) # If the name starts with "ISO-8859", the C1 control code area is added automatically. - def transcode_tblgen_singlebyte (name) + def transcode_tblgen_singlebyte(name) require(name.downcase + "-tbl") control1_if_needed = (name =~ /^ISO-8859/) ? CONTROL1_TO_UCS_TBL : [] tbl_to_ucs = control1_if_needed + eval(name.gsub(/-/, '_') + "_TO_UCS_TBL") - code = '' - code << transcode_tblgen(name, "UTF-8", [["{00-7f}", :nomap], *tbl_to_ucs.reject {|a, b| a.length != 2 }], '{00-ff}') - code << "\n" - code << transcode_tblgen("UTF-8", name, [["{00-7f}", :nomap], *tbl_to_ucs.map {|a,b| [b,a] }]) - code + transcode_tblgen(name, "UTF-8", [["{00-7f}", :nomap], *tbl_to_ucs.reject {|a, b| a.length != 2 }], '{00-ff}') + transcode_tblgen("UTF-8", name, [["{00-7f}", :nomap], *tbl_to_ucs.map {|a,b| [b,a] }]) end transcode_tblgen_singlebyte "ISO-8859-1" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/