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

ruby-changes:33237

From: ktsj <ko1@a...>
Date: Tue, 11 Mar 2014 22:23:46 +0900 (JST)
Subject: [ruby-changes:33237] ktsj:r45316 (trunk): * test/objspace/test_objspace.rb (TestObjSpace#test_dump_uninitialized_file):

ktsj	2014-03-11 22:23:43 +0900 (Tue, 11 Mar 2014)

  New Revision: 45316

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

  Log:
    * test/objspace/test_objspace.rb (TestObjSpace#test_dump_uninitialized_file):
      remove dependency on json library.

  Modified files:
    trunk/ChangeLog
    trunk/test/objspace/test_objspace.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45315)
+++ ChangeLog	(revision 45316)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Mar 11 22:22:38 2014  Kazuki Tsujimoto  <kazuki@c...>
+
+	* test/objspace/test_objspace.rb (TestObjSpace#test_dump_uninitialized_file):
+	  remove dependency on json library.
+
 Tue Mar 11 10:55:10 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* README.EXT{,.ja} (Appendix B): update contents of `ruby_options`
Index: test/objspace/test_objspace.rb
===================================================================
--- test/objspace/test_objspace.rb	(revision 45315)
+++ test/objspace/test_objspace.rb	(revision 45316)
@@ -268,13 +268,12 @@ class TestObjSpace < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/objspace/test_objspace.rb#L268
   end
 
   def test_dump_uninitialized_file
-    assert_in_out_err(%[-robjspace], <<-RUBY) do |output, error|
+    assert_in_out_err(%[-robjspace], <<-RUBY) do |(output), (error)|
       puts ObjectSpace.dump(File.allocate)
     RUBY
-      assert_equal [], error
-      json = JSON.load(output.join)
-      assert_equal "FILE", json["type"]
-      assert_nil json["fd"]
+      assert_nil error
+      assert_match /"type":"FILE"/, output
+      assert_not_match /"fd":/, output
     end
   end
 end

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

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