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

ruby-changes:34563

From: nobu <ko1@a...>
Date: Wed, 2 Jul 2014 02:14:33 +0900 (JST)
Subject: [ruby-changes:34563] nobu:r46644 (trunk): test_proc.rb: test_local_variables

nobu	2014-07-02 02:14:22 +0900 (Wed, 02 Jul 2014)

  New Revision: 46644

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

  Log:
    test_proc.rb: test_local_variables
    
    * test/ruby/test_proc.rb (test_local_variables): missing test for
      Binding#local_variables.  [Feature #8773]

  Modified files:
    trunk/test/ruby/test_proc.rb
Index: test/ruby/test_proc.rb
===================================================================
--- test/ruby/test_proc.rb	(revision 46643)
+++ test/ruby/test_proc.rb	(revision 46644)
@@ -1251,6 +1251,11 @@ class TestProc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_proc.rb#L1251
     binding
   end
 
+  def test_local_variables
+    b = get_binding
+    assert_equal(%i[if case when begin end a], b.local_variables)
+  end
+
   def local_variables_of(bind)
     this_should_not_be_in_bind = 2
     bind.local_variables

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

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