[前][次][番号順一覧][スレッド一覧]

ruby-changes:2684

From: ko1@a...
Date: 10 Dec 2007 17:26:28 +0900
Subject: [ruby-changes:2684] nobu - Ruby:r14175 (trunk): * transcode*.[ch], test/ruby/test_transcode.rb: set properties.

nobu	2007-12-10 17:25:01 +0900 (Mon, 10 Dec 2007)

  New Revision: 14175

  Modified files:
    trunk/test/ruby/test_transcode.rb
    trunk/transcode.c
    trunk/transcode_data.h
    trunk/transcode_data_iso_8859.c

  Log:
    * transcode*.[ch], test/ruby/test_transcode.rb: set properties.

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/transcode_data.h?r1=14175&r2=14174
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_transcode.rb?r1=14175&r2=14174
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_transcode.rb?r1=14175&r2=14174
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/transcode.c?r1=14175&r2=14174
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/transcode.c?r1=14175&r2=14174
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/transcode_data_iso_8859.c?r1=14175&r2=14174


Property changes on: transcode_data_iso_8859.c
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + LF


Property changes on: transcode_data.h
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + LF

Index: test/ruby/test_transcode.rb
===================================================================
--- test/ruby/test_transcode.rb	(revision 14174)
+++ test/ruby/test_transcode.rb	(revision 14175)
@@ -1,44 +1,44 @@
-# -*- encoding: US-ASCII -*-   # make sure this runs in binary mode
-
-class String
-  # different name, because we should be able to remove this later
-  def fix_encoding (encoding)
-    force_encoding(encoding)
-  end
-end
-
-require 'test/unit'
-class TestConvert < Test::Unit::TestCase
-  def test_can_call
-    # we don't have semantics for conversion without attribute yet
-    # maybe 'convert to UTF-8' would be nice :-)
-    assert_raise(ArgumentError) { 'abc'.encode }
-    assert_raise(ArgumentError) { 'abc'.encode! }
-    assert_raise(ArgumentError) { 'abc'.force_encoding('Shift_JIS').encode('UTF-8') } # temporary
-    assert_raise(ArgumentError) { 'abc'.force_encoding('Shift_JIS').encode!('UTF-8') } # temporary
-    assert_raise(ArgumentError) { 'abc'.encode('foo', 'bar') }
-    assert_raise(ArgumentError) { 'abc'.encode!('foo', 'bar') }
-    assert_raise(ArgumentError) { 'abc'.force_encoding('utf-8').encode('foo') }
-    assert_raise(ArgumentError) { 'abc'.force_encoding('utf-8').encode!('foo') }
-    assert_equal('abc'.force_encoding('utf-8').encode('iso-8859-1'), 'abc') # temporary, fix encoding
-    assert_equal("D\xFCrst".force_encoding('iso-8859-1').encode('utf-8').fix_encoding('utf-8'), "D\u00FCrst")
-    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-1').fix_encoding('utf-8'), "D\u00FCrst")
-    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-2').fix_encoding('utf-8'), "D\u00FCrst")
-    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-3').fix_encoding('utf-8'), "D\u00FCrst")
-    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-4').fix_encoding('utf-8'), "D\u00FCrst")
-    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-9').fix_encoding('utf-8'), "D\u00FCrst")
-    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-10').fix_encoding('utf-8'), "D\u00FCrst")
-    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-13').fix_encoding('utf-8'), "D\u00FCrst")
-    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-14').fix_encoding('utf-8'), "D\u00FCrst")
-    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-15').fix_encoding('utf-8'), "D\u00FCrst")
-    assert_equal("D\u00FCrst".encode('iso-8859-1'), "D\xFCrst")
-    assert_equal("D\u00FCrst".encode('iso-8859-2'), "D\xFCrst")
-    assert_equal("D\u00FCrst".encode('iso-8859-3'), "D\xFCrst")
-    assert_equal("D\u00FCrst".encode('iso-8859-4'), "D\xFCrst")
-    assert_equal("D\u00FCrst".encode('iso-8859-9'), "D\xFCrst")
-    assert_equal("D\u00FCrst".encode('iso-8859-10'), "D\xFCrst")
-    assert_equal("D\u00FCrst".encode('iso-8859-13'), "D\xFCrst")
-    assert_equal("D\u00FCrst".encode('iso-8859-14'), "D\xFCrst")
-    assert_equal("D\u00FCrst".encode('iso-8859-15'), "D\xFCrst")
-  end
-end
\ No newline at end of file
+# -*- encoding: US-ASCII -*-   # make sure this runs in binary mode
+
+class String
+  # different name, because we should be able to remove this later
+  def fix_encoding (encoding)
+    force_encoding(encoding)
+  end
+end
+
+require 'test/unit'
+class TestConvert < Test::Unit::TestCase
+  def test_can_call
+    # we don't have semantics for conversion without attribute yet
+    # maybe 'convert to UTF-8' would be nice :-)
+    assert_raise(ArgumentError) { 'abc'.encode }
+    assert_raise(ArgumentError) { 'abc'.encode! }
+    assert_raise(ArgumentError) { 'abc'.force_encoding('Shift_JIS').encode('UTF-8') } # temporary
+    assert_raise(ArgumentError) { 'abc'.force_encoding('Shift_JIS').encode!('UTF-8') } # temporary
+    assert_raise(ArgumentError) { 'abc'.encode('foo', 'bar') }
+    assert_raise(ArgumentError) { 'abc'.encode!('foo', 'bar') }
+    assert_raise(ArgumentError) { 'abc'.force_encoding('utf-8').encode('foo') }
+    assert_raise(ArgumentError) { 'abc'.force_encoding('utf-8').encode!('foo') }
+    assert_equal('abc'.force_encoding('utf-8').encode('iso-8859-1'), 'abc') # temporary, fix encoding
+    assert_equal("D\xFCrst".force_encoding('iso-8859-1').encode('utf-8').fix_encoding('utf-8'), "D\u00FCrst")
+    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-1').fix_encoding('utf-8'), "D\u00FCrst")
+    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-2').fix_encoding('utf-8'), "D\u00FCrst")
+    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-3').fix_encoding('utf-8'), "D\u00FCrst")
+    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-4').fix_encoding('utf-8'), "D\u00FCrst")
+    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-9').fix_encoding('utf-8'), "D\u00FCrst")
+    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-10').fix_encoding('utf-8'), "D\u00FCrst")
+    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-13').fix_encoding('utf-8'), "D\u00FCrst")
+    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-14').fix_encoding('utf-8'), "D\u00FCrst")
+    assert_equal("D\xFCrst".encode('utf-8', 'iso-8859-15').fix_encoding('utf-8'), "D\u00FCrst")
+    assert_equal("D\u00FCrst".encode('iso-8859-1'), "D\xFCrst")
+    assert_equal("D\u00FCrst".encode('iso-8859-2'), "D\xFCrst")
+    assert_equal("D\u00FCrst".encode('iso-8859-3'), "D\xFCrst")
+    assert_equal("D\u00FCrst".encode('iso-8859-4'), "D\xFCrst")
+    assert_equal("D\u00FCrst".encode('iso-8859-9'), "D\xFCrst")
+    assert_equal("D\u00FCrst".encode('iso-8859-10'), "D\xFCrst")
+    assert_equal("D\u00FCrst".encode('iso-8859-13'), "D\xFCrst")
+    assert_equal("D\u00FCrst".encode('iso-8859-14'), "D\xFCrst")
+    assert_equal("D\u00FCrst".encode('iso-8859-15'), "D\xFCrst")
+  end
+end

Property changes on: test/ruby/test_transcode.rb
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + LF

Index: transcode.c
===================================================================
--- transcode.c	(revision 14174)
+++ transcode.c	(revision 14175)
@@ -2,8 +2,8 @@
 
   transcode.c -
 
-  $Author: duerst $
-  $Date: 2007-10-30 16:10:22 +0900 (Tue, 30 Oct 2007) $
+  $Author$
+  $Date$
   created at: Tue Oct 30 16:10:22 JST 2007
 
   Copyright (C) 2007 Martin Duerst

Property changes on: transcode.c
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + LF


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]