# IronRuby Rake and -X:PrivateBrowsing

**URL:** <https://www.ruby-forum.com/t/ironruby-rake-and-x-privatebrowsing/192548>\
**Category:** IronRuby\
**Created:** [August 1, 2010, 9:44pm UTC](https://www.ruby-forum.com/t/ironruby-rake-and-x-privatebrowsing/192548 "2010-08-01T21:44:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevben](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/90ced4/32.png) [@kevben](https://www.ruby-forum.com/u/kevben)\
**Post date:** [August 1, 2010, 9:44pm UTC](https://www.ruby-forum.com/t/ironruby-rake-and-x-privatebrowsing/192548/1 "2010-08-01T21:44:39Z")

</div>

I’m trying to setup a Rake script to run all my IronRuby rspec tests.  
The tests need to have access to internal constructors and methods.  
IronRuby supports this with the -X:PrivateBinding switch on ir.exe.

So, for example, if my test is called some\_tests.rb, the following  
command works:  
ir -X:PrivateBinding -S spec some\_tests.rb

However, when I try to run rake that way it bombs out.

To repo, follow these steps:  
Write a rakefile like the following:

task :test do  
puts “TEST PASSED”  
end

Running this command will succeed:  
ir -S rake test

Running this command will fail:  
ir -X:PrivateBinding -S rake test

with the following error: C:/IronRuby  
1.1/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1275: syntax  
error, unexpected `.’

I’m running IronRuby 1.1.0.0 on .NET 4.0.30319.1 with rake 0.8.7.

I also posted this question to Stack Overflow:

> <https://stackoverflow.com/questions/3383365/ironruby-rake-and-xprivatebinding>

@ironshay suggested I post it here as well.

Thanks,  
Kevin
