# RubySpec and Version Targeting

**URL:** <https://www.ruby-forum.com/t/rubyspec-and-version-targeting/190398>\
**Category:** IronRuby\
**Created:** [June 19, 2010, 6:15am UTC](https://www.ruby-forum.com/t/rubyspec-and-version-targeting/190398 "2010-06-19T06:15:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [June 19, 2010, 6:15am UTC](https://www.ruby-forum.com/t/rubyspec-and-version-targeting/190398/1 "2010-06-19T06:15:06Z")

</div>

So, I’ve finally started doing some work on code for the 30-something  
failing OpenSSL specs. The first one I’ve come across is  
openssl\cipher\_spec. There are two different descriptions of the spec  
here:  
one for version up to 1.8.7, and one for 1.8.7 (I guess they changed the  
namespace of CipherError in 1.8.7). What I’m looking for is some  
guidance.  
Should I implement the 1.8.6 version, or the 1.8.7 version? If the  
latter,  
how do I tell mspec that it should be running as 1.8.7?

Thanks!

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [June 19, 2010, 9:13am UTC](https://www.ruby-forum.com/t/rubyspec-and-version-targeting/190398/2 "2010-06-19T09:13:36Z")

</div>

If it’s just a namespace change, I would target both using the  
RubyCompatibility flags that get set in the option parser. If you look  
around, you should be able to find examples related to encodings,  
enumerable or method names. Search for the file RubyCompatibility.cs,  
then search for uses of the enum.

RubySpec gets its guard information from the version that the  
implementation reports, so in our case, passing the flag -187 to ir.exe  
puts us in 1.8.7 mode. Passing -T"-187" to mspec will cause mspec to  
pass that flag to ir.

JD

* * *

From: Will G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Friday, June 18, 2010 9:16 PM  
To: ironruby-core [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [Ironruby-core] RubySpec and Version Targeting

So, I’ve finally started doing some work on code for the 30-something  
failing OpenSSL specs. The first one I’ve come across is  
openssl\cipher\_spec. There are two different descriptions of the spec  
here: one for version up to 1.8.7, and one for 1.8.7 (I guess they  
changed the namespace of CipherError in 1.8.7). What I’m looking for is  
some guidance. Should I implement the 1.8.6 version, or the 1.8.7  
version? If the latter, how do I tell mspec that it should be running as  
1.8.7?

Thanks!

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [June 19, 2010, 6:44pm UTC](https://www.ruby-forum.com/t/rubyspec-and-version-targeting/190398/3 "2010-06-19T18:44:19Z")

</div>

I don’t think it’s worth the effort. We’re targeting 1.9 for the next  
major release and I assume 1.9 is the same as 1.8.7 regarding  
CipherError so let’s do whatever 1.9 does.

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Jim D.  
Sent: Saturday, June 19, 2010 12:13 AM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] RubySpec and Version Targeting

If it’s just a namespace change, I would target both using the  
RubyCompatibility flags that get set in the option parser. If you look  
around, you should be able to find examples related to encodings,  
enumerable or method names. Search for the file RubyCompatibility.cs,  
then search for uses of the enum.

RubySpec gets its guard information from the version that the  
implementation reports, so in our case, passing the flag -187 to ir.exe  
puts us in 1.8.7 mode. Passing -T"-187" to mspec will cause mspec to  
pass that flag to ir.

JD

* * *

From: Will G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Friday, June 18, 2010 9:16 PM  
To: ironruby-core [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [Ironruby-core] RubySpec and Version Targeting  
So, I’ve finally started doing some work on code for the 30-something  
failing OpenSSL specs. The first one I’ve come across is  
openssl\cipher\_spec. There are two different descriptions of the spec  
here: one for version up to 1.8.7, and one for 1.8.7 (I guess they  
changed the namespace of CipherError in 1.8.7). What I’m looking for is  
some guidance. Should I implement the 1.8.6 version, or the 1.8.7  
version? If the latter, how do I tell mspec that it should be running as  
1.8.7?

Thanks!
