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

ruby-changes:14541

From: mame <ko1@a...>
Date: Fri, 22 Jan 2010 23:53:31 +0900 (JST)
Subject: [ruby-changes:14541] Ruby:r26378 (trunk): * test/ruby/test_regexp.rb, test/ruby/test_symbol.rb,

mame	2010-01-22 23:53:12 +0900 (Fri, 22 Jan 2010)

  New Revision: 26378

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

  Log:
    * test/ruby/test_regexp.rb, test/ruby/test_symbol.rb,
      test/ruby/test_variable.rb: add some tests (for coverage of
      compile.c).

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_regexp.rb
    trunk/test/ruby/test_symbol.rb
    trunk/test/ruby/test_variable.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26377)
+++ ChangeLog	(revision 26378)
@@ -1,3 +1,9 @@
+Fri Jan 22 23:50:03 2010  Yusuke Endoh  <mame@t...>
+
+	* test/ruby/test_regexp.rb, test/ruby/test_symbol.rb,
+	  test/ruby/test_variable.rb: add some tests (for coverage of
+	  compile.c).
+
 Fri Jan 22 21:05:34 2010  Tanaka Akira  <akr@f...>
 
 	* time.c (time_mload): add submicro into vtm.subsecx.  [ruby-dev:40133] 
Index: test/ruby/test_regexp.rb
===================================================================
--- test/ruby/test_regexp.rb	(revision 26377)
+++ test/ruby/test_regexp.rb	(revision 26378)
@@ -795,4 +795,9 @@
     h = {a => 42}
     assert_equal(42, h[b], '[ruby-core:24748]')
   end
+
+  def test_regexp_poped
+    assert_nothing_raised { eval("a = 1; /\#{ a }/; a") }
+    assert_nothing_raised { eval("a = 1; /\#{ a }/o; a") }
+  end
 end
Index: test/ruby/test_variable.rb
===================================================================
--- test/ruby/test_variable.rb	(revision 26377)
+++ test/ruby/test_variable.rb	(revision 26378)
@@ -85,4 +85,8 @@
   def test_global_variable_poped
     assert_nothing_raised { eval("$foo; 1") }
   end
+
+  def test_constant_poped
+    assert_nothing_raised { eval("TestVariable::Gods; 1") }
+  end
 end
Index: test/ruby/test_symbol.rb
===================================================================
--- test/ruby/test_symbol.rb	(revision 26377)
+++ test/ruby/test_symbol.rb	(revision 26378)
@@ -132,4 +132,8 @@
     assert_equal(:Foo, :foo.capitalize)
     assert_equal(:fOo, :FoO.swapcase)
   end
+
+  def test_symbol_poped
+    assert_nothing_raised { eval('a = 1; :"#{ a }"; 1') }
+  end
 end

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

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