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

ruby-changes:22827

From: nobu <ko1@a...>
Date: Fri, 2 Mar 2012 23:05:39 +0900 (JST)
Subject: [ruby-changes:22827] nobu:r34876 (trunk): subclass of String

nobu	2012-03-02 23:05:28 +0900 (Fri, 02 Mar 2012)

  New Revision: 34876

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34876

  Log:
    subclass of String
    
    * test/ruby/test_string.rb (TestString2): tests for subclass of
      String.

  Modified files:
    trunk/test/ruby/test_string.rb

Index: test/ruby/test_string.rb
===================================================================
--- test/ruby/test_string.rb	(revision 34875)
+++ test/ruby/test_string.rb	(revision 34876)
@@ -1977,3 +1977,10 @@
     assert_equal(u("\x82")+("\u3042"*9), ("\u3042"*10).byteslice(2, 28))
   end
 end
+
+class TestString2 < TestString
+  def initialize(*args)
+    super
+    @cls = S2
+  end
+end

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

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