summaryrefslogtreecommitdiff
path: root/tool/transcode-tblgen.rb
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-24 10:26:18 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-24 10:26:18 +0000
commit28862075842f6e8e62d00954a291b01ba80e61a1 (patch)
treebf04e370edde10bbb3716dfc6a7e24c57c421183 /tool/transcode-tblgen.rb
parent9914a16ca941f47b9fa32874933594a59cf65267 (diff)
* enc/trans/big5.trans, big5-hkscs-tbl.rb:
new Chinese BIG5-HKSCS transcoding (with Tatsuya Mizuno) * test/ruby/test_transcode.rb: added tests for the above (with Tatsuya Mizuno) * enc/big5.c: Added BIG5-HKSCS as a replicate encoding of BIG5 (short term solution, needs more work; with Tatsuya Mizuno) * tool/transcode-tblgen.rb: made 'pat' directly accessible in class StrSet git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/transcode-tblgen.rb')
-rwxr-xr-xtool/transcode-tblgen.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb
index f7f05c4..a4bd766 100755
--- a/tool/transcode-tblgen.rb
+++ b/tool/transcode-tblgen.rb
@@ -19,6 +19,7 @@ def c_esc(str)
end
class StrSet
+ attr_reader :pat
def self.parse(pattern)
if /\A\s*(([0-9a-f][0-9a-f]|\{([0-9a-f][0-9a-f]|[0-9a-f][0-9a-f]-[0-9a-f][0-9a-f])(,([0-9a-f][0-9a-f]|[0-9a-f][0-9a-f]-[0-9a-f][0-9a-f]))*\})+(\s+|\z))*\z/i !~ pattern
raise ArgumentError, "invalid pattern: #{pattern.inspect}"
@@ -68,7 +69,7 @@ class StrSet
def eql?(other)
self.class == other.class &&
- @pat == other.instance_eval { @pat }
+ @pat == other.pat
end
alias == eql?