# Did Something Changed Again in Spec

**URL:** <https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254>\
**Category:** IronRuby\
**Created:** [January 25, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254 "2010-01-25T17:56:17Z")\
**Posts on this page:** 15\
**Page:** 3

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 25, 2010, 9:25pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/41 "2010-01-25T21:25:29Z")

</div>

RCov is partially written in C, so of course it is not supported yet.

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 26, 2010, 6:03am UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/42 "2010-01-26T06:03:33Z")

</div>

I asked about that earlier, as well, and got the response that it is not  
covered. I believe one of the goals post-1.0 is to get Ruby FFI working.  
If  
you’d like to see RCov working, you might write a patch to move RCov to  
Ruby  
FFI so that it will work on IronRuby once FFI support is working. And if  
you  
get that done, you might even be able to pitch in with the FFI  
implementation. I, for one, would appreciate it. 🙂 Of course, I could  
do  
those, too, but I’m working on a few other things, atm. 🙂

Ryan R.

Email: removed\_email\_address@domain.invalid  
LinkedIn: [http://www.linkedin.com/in/ryanriley](http://www.linkedin.com/in/ryanriley)  
Blog: [http://wizardsofsmart.net/](http://wizardsofsmart.net/)  
Twitter: @panesofglass  
Website: [http://panesofglass.org/](http://panesofglass.org/)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 26, 2010, 10:08am UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/43 "2010-01-26T10:08:11Z")

</div>

How does implementing FFI provide code coverage for the CLR, isn’t that  
mutually exclusive? Shouldn’t FFI provide us with a way to use C-based  
extensions? But C-based extensions won’t know about the ironruby  
internals  
etc. Just thinking out loud so feel free to correct me 🙂

Also aren’t the stacks produced by IronRuby a little different from the  
stacks produced by MRI for example.

## To get code coverage for the CLR is that again the CLR profiling API you would leverage? could somebody point me in the right direction?

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([IronRuby in Action - Ivan Porto Carrero and Adam Burmister | Manning](http://manning.com/carrero))

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 26, 2010, 10:18am UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/44 "2010-01-26T10:18:08Z")

</div>

Youâ€™re correct Ivan. Today RCov isnâ€™t even supported on IronRuby because  
it uses a small c-extension. As Shri said previously, itâ€™d be great if  
someone could remove the dependency on the C-extension (easiest way is  
to write the equivalent Ruby code â€¦ what Ryan is suggesting is a better  
way-long-term goal for IronRuby to be compatible with FFI-based  
extensions), and then RCov would work for code coverage of only ruby  
code. Now, imagine that was done, and it was called ironruby-rcov â€¦ this  
wouldnâ€™t work for code coverage of your .NET code, so youâ€™ll have to use  
the CLR code coverage tools. Only at that point could you think about  
add CLR support to ironruby-rcov.

Make sense now?

~Jimmy

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Ivan Porto  
Carrero  
Sent: Tuesday, January 26, 2010 1:08 AM  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Ironruby-core] Did Something Changed Again in Spec…

How does implementing FFI provide code coverage for the CLR, isn’t that  
mutually exclusive? Shouldn’t FFI provide us with a way to use C-based  
extensions? But C-based extensions won’t know about the ironruby  
internals etc. Just thinking out loud so feel free to correct me 🙂

Also aren’t the stacks produced by IronRuby a little different from the  
stacks produced by MRI for example.

## To get code coverage for the CLR is that again the CLR profiling API you would leverage? could somebody point me in the right direction?

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([IronRuby in Action - Ivan Porto Carrero and Adam Burmister | Manning](http://manning.com/carrero))

On Tue, Jan 26, 2010 at 6:02 AM, Ryan R.  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
I asked about that earlier, as well, and got the response that it is not  
covered. I believe one of the goals post-1.0 is to get Ruby FFI working.  
If you’d like to see RCov working, you might write a patch to move RCov  
to Ruby FFI so that it will work on IronRuby once FFI support is  
working. And if you get that done, you might even be able to pitch in  
with the FFI implementation. I, for one, would appreciate it. 🙂 Of  
course, I could do those, too, but I’m working on a few other things,  
atm. 🙂

Ryan R.

Email: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
LinkedIn: [Ryan Riley - Quorum Software | LinkedIn](http://www.linkedin.com/in/ryanriley)  
Blog: [http://wizardsofsmart.net/](http://wizardsofsmart.net/)  
Twitter: @panesofglass  
Website: [http://panesofglass.org/](http://panesofglass.org/)

On Mon, Jan 25, 2010 at 2:15 PM, Mohammad A.  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
I was trying to make ironruby to perform code coverage for a .NET  
assembly using rcov but it seems like it is not currently supported  
yet..

–  
Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

* * *

Ironruby-core mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

* * *

Ironruby-core mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 26, 2010, 2:40pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/45 "2010-01-26T14:40:22Z")

</div>

What Jimmy said. 😃

Ryan R.

Email: removed\_email\_address@domain.invalid  
LinkedIn: [http://www.linkedin.com/in/ryanriley](http://www.linkedin.com/in/ryanriley)  
Blog: [http://wizardsofsmart.net/](http://wizardsofsmart.net/)  
Twitter: @panesofglass  
Website: [http://panesofglass.org/](http://panesofglass.org/)

On Tue, Jan 26, 2010 at 3:17 AM, Jimmy S. \<

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 26, 2010, 2:42pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/46 "2010-01-26T14:42:43Z")

</div>

Also, I think Ruby’s FFI is relatively new and not in great use, atm, so  
even adding FFI to IronRuby wouldn’t do a whole lot to enable the C  
extensions of most Ruby libraries until those are ported to use FFI. Is  
that  
right?

Ryan R.

Email: removed\_email\_address@domain.invalid  
LinkedIn: [http://www.linkedin.com/in/ryanriley](http://www.linkedin.com/in/ryanriley)  
Blog: [http://wizardsofsmart.net/](http://wizardsofsmart.net/)  
Twitter: @panesofglass  
Website: [http://panesofglass.org/](http://panesofglass.org/)

On Tue, Jan 26, 2010 at 3:17 AM, Jimmy S. \<

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 26, 2010, 10:36am UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/47 "2010-01-26T10:36:52Z")

</div>

rcov has a pure ruby variant too IIRC. And for the sake of this  
discussion  
let’s just say that that works as is with IronRuby.

## Then I’d be looking at the CLR profiling api again isn’t it. And to enable that profiling API don’t I have to instrument my dll with some constants so it knows it’s going to be profiled?

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([IronRuby in Action - Ivan Porto Carrero and Adam Burmister | Manning](http://manning.com/carrero))

On Tue, Jan 26, 2010 at 10:17 AM, Jimmy S. \<

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 26, 2010, 2:51pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/48 "2010-01-26T14:51:30Z")

</div>

On Tue, Jan 26, 2010 at 3:36 AM, Ivan Porto C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> rcov has a pure ruby variant too IIRC. And for the sake of this discussion  
> let’s just say that that works as is with IronRuby.
> 
> Then I’d be looking at the CLR profiling api again isn’t it.  
> And to enable that profiling API don’t I have to instrument my dll with  
> some constants so it knows it’s going to be profiled?

If that’s true, then we could start looking into making it work with  
.dlls.  
What we may find is something similar to the mocking story: writing a  
new  
one is just easier and makes more sense, e.g. caricature. RCov may turn  
out  
to be useful only for Ruby apps and too difficult to make work with  
anything  
else.

Here’s an InfoQ link on some of the progress made by JRuby (and  
Rubinius’  
FFI): [JRuby Roundup: 1.1.3, rcov4jr, Rubinius MVM and FFI - InfoQ](http://www.infoq.com/news/2008/07/jruby113-rcov-rubinius-ffi-mvm)  
This  
might be helpful if we decide to attempt a straight port with C#  
extensions.

Ryan R.

Email: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
LinkedIn: [Ryan Riley - Quorum Software | LinkedIn](http://www.linkedin.com/in/ryanriley)  
Blog: [http://wizardsofsmart.net/](http://wizardsofsmart.net/)  
Twitter: @panesofglass  
Website: [http://panesofglass.org/](http://panesofglass.org/)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 26, 2010, 6:59pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/49 "2010-01-26T18:59:44Z")

</div>

Any particular reason you aren’t using NCover or Clover? I’m not sure  
generating coverage reports via rcov (even if it existed for the CLR)  
for dlls written in C# would actually produce anything usable.

Cheers,  
Sidu.

> **[Electric Sheep Blog](http://blog.sidu.in)**
>
> On hacking and startups by Sidu Ponnappa

[http://twitter.com/ponnappa](http://twitter.com/ponnappa)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 26, 2010, 8:17pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/50 "2010-01-26T20:17:36Z")

</div>

Ivan, no, you do not need to instrument your dll to use the profiling  
APIs. Instead, you have to set an environment variable called  
COR\_PROFILER. [Setting Up a Profiling Environment - .NET Framework | Microsoft Learn](http://msdn.microsoft.com/en-us/library/bb384689.aspx) has  
more info.

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Ryan R.  
Sent: Tuesday, January 26, 2010 5:51 AM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Did Something Changed Again in Spec…

On Tue, Jan 26, 2010 at 3:36 AM, Ivan Porto C.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
rcov has a pure ruby variant too IIRC. And for the sake of this  
discussion let’s just say that that works as is with IronRuby.

Then I’d be looking at the CLR profiling api again isn’t it.  
And to enable that profiling API don’t I have to instrument my dll with  
some constants so it knows it’s going to be profiled?

If that’s true, then we could start looking into making it work with  
.dlls. What we may find is something similar to the mocking story:  
writing a new one is just easier and makes more sense, e.g. caricature.  
RCov may turn out to be useful only for Ruby apps and too difficult to  
make work with anything else.

Here’s an InfoQ link on some of the progress made by JRuby (and  
Rubinius’ FFI):  
[JRuby Roundup: 1.1.3, rcov4jr, Rubinius MVM and FFI](http://www.infoq.com/news/2008/07/jruby113-rcov-rubinius-ffi-mvm) This  
might be helpful if we decide to attempt a straight port with C#  
extensions.

Ryan R.

Email: removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
LinkedIn: [http://www.linkedin.com/in/ryanriley](http://www.linkedin.com/in/ryanriley)  
Blog: [http://wizardsofsmart.net/](http://wizardsofsmart.net/)  
Twitter: @panesofglass  
Website: [http://panesofglass.org/](http://panesofglass.org/)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 27, 2010, 12:10am UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/51 "2010-01-27T00:10:13Z")

</div>

I’ve worked with the COR\_PROFILER a little bit before… I’ll look if  
it’s possible from IronRuby 🙂

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [February 1, 2010, 12:40pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/52 "2010-02-01T12:40:08Z")

</div>

> copy C:\ironruby\lib\ironruby\gems\bin\spec C:\ironruby\bin\ispec  
> copy C:\ironruby\lib\ironruby\gems\bin\spec.bat C:\ironruby\bin\ispec.bat

On my machine (in case it’s useful to someone else), here are the paths  
and  
instructions for rspec

> <https://gist.github.com/thbar/291624>

– Thibaut

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [February 1, 2010, 12:58pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/53 "2010-02-01T12:58:17Z")

</div>

you don’t need to do that anymore 🙂

At least not for the ironruby that is on github and built from source

there the instructions become:

ir -S gem install rspec

run specs:  
ir -S spec spec/\*\*/\*\_spec.rb

* * *

Met vriendelijke groeten - Best regards - Salutations  
Ivan Porto C.  
Blog: [http://flanders.co.nz](http://flanders.co.nz)  
Twitter: [http://twitter.com/casualjim](http://twitter.com/casualjim)  
Author of IronRuby in Action ([http://manning.com/carrero](http://manning.com/carrero))

On Mon, Feb 1, 2010 at 12:39 PM, Thibaut BarrÃ¨re

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [January 26, 2010, 10:36pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/54 "2010-01-26T22:36:24Z")

</div>

> ## Can we move forward to solve the problem instead of mocking?

I would expect you would have better success moving forward if you did  
not  
make inflammatory statements such as these:

“This is a big defect in the IronRuby. Too many configurations will  
scare developers away.”

"Not many people are willing to try out IronRuby because of  
configuration  
issues. "

“You are NOT thinking throughly about the problem!”

“I am not trying to put down IronRuby but sorry this is not going to  
work in  
the real world.”

It is clear that you believe IronRuby is too hard to configure, and I’ve  
no  
doubt that you are feeling some pain. Please try not to make exaggerated  
statements saying things are universally broken and unacceptable just  
because you are not able to solve something.

Thanks, Orion

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [February 1, 2010, 1:05pm UTC](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254/55 "2010-02-01T13:05:18Z")

</div>

> you don’t need to do that anymore 🙂

> At least not for the ironruby that is on github and built from source
> 
> there the instructions become:
> 
> ir -S gem install rspec
> 
> run specs:  
> ir -S spec spec/\*\*/\*\_spec.rb

thanks for the trick, that’s good to hear (although I mostly use MSI  
releases these days, doing client work).

– Thibaut

[Previous page](https://www.ruby-forum.com/t/did-something-changed-again-in-spec/182254.md?page=2)
