[Rubytests-commit] rubicon/builtin TestBinding.rb

headius@rubyforge.org headius at rubyforge.org
Sun Jan 22 06:49:16 EST 2006


Update of /var/cvs/rubytests/rubicon/builtin
In directory rubyforge.org:/tmp/cvs-serv25629/builtin

Modified Files:
	TestBinding.rb 
Log Message:
added a test similar to one in C ruby that fails in JRuby

Index: TestBinding.rb
===================================================================
RCS file: /var/cvs/rubytests/rubicon/builtin/TestBinding.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestBinding.rb	22 Jan 2006 07:35:03 -0000	1.2
--- TestBinding.rb	22 Jan 2006 11:49:14 -0000	1.3
***************
*** 2,5 ****
--- 2,6 ----
  require 'rubicon'
  
+ # This should probably have some checks for 1.8?
  
  class TestBinding < Rubicon::TestCase
***************
*** 10,14 ****
  	end
  	
! 	def test_eval
  		def x
  			str = "hello"
--- 11,15 ----
  	end
  	
! 	def test_basic_binding
  		def x
  			str = "hello"
***************
*** 23,26 ****
--- 24,36 ----
  		assert_equal "goodbye", eval("str", x_binding)
  	end
+ 	
+ 	def test_lambda_binding
+ 		lambda_binding = lambda {
+ 			str = "hello"
+ 			binding
+ 		}.call
+ 		
+ 		assert_equal "hello", eval("str", lambda_binding)
+ 	end
  end
  



More information about the Rubytests-commit mailing list