# Code Review: Etc module for Mono

**URL:** <https://www.ruby-forum.com/t/code-review-etc-module-for-mono/187109>\
**Category:** IronRuby\
**Created:** [April 17, 2010, 8:44am UTC](https://www.ruby-forum.com/t/code-review-etc-module-for-mono/187109 "2010-04-17T08:44:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://www.ruby-forum.com/u/ryan)\
**Post date:** [April 17, 2010, 8:44am UTC](https://www.ruby-forum.com/t/code-review-etc-module-for-mono/187109/1 "2010-04-17T08:44:11Z")

</div>

> **[GitHub - panesofglass/ironruby: Microsoft's Ruby language compiler that is...](https://github.com/panesofglass/ironruby)**
>
> Microsoft's Ruby language compiler that is built on top of the Dynamic Language Runtime. - GitHub - panesofglass/ironruby: Microsoft's Ruby language compiler that is built on top of the ...

git diff attached

- Implements the Etc module for Mono
- Adds RubySpec updates for the Etc library
- Additional updates (dev.sh, ir.sh, many path-related changes) to allow  
\*nix devs to run irtests, though this isn’t complete.

Regards,

Ryan R.

---

<div class="post-metadata">

**Author:** ![ryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://www.ruby-forum.com/u/ryan)\
**Post date:** [April 17, 2010, 8:49am UTC](https://www.ruby-forum.com/t/code-review-etc-module-for-mono/187109/2 "2010-04-17T08:49:27Z")

</div>

Many thanks to Ivan for his dev.sh, ir.sh, and help with many of the  
implementation details. Gotta give credit where credit is due. The bad  
Ruby  
idioms will all be due to me, so just let me know what you need me to  
change. 🙂

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:** ![ryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://www.ruby-forum.com/u/ryan)\
**Post date:** [April 18, 2010, 11:14pm UTC](https://www.ruby-forum.com/t/code-review-etc-module-for-mono/187109/3 "2010-04-18T23:14:09Z")

</div>

Given that I couldn’t run tests on Mono and I couldn’t figure out how  
ROWAN\_RUNTIME was used, I went with the cmd\_prefix. I can strip that  
back  
off. As to the mono\_debug folder, you’ll need to ask Ivan. I think I  
added  
the explicit use of that folder, but that’s the folder to which the mono  
build was compiling. I’ll check into it again.

Regards,

Ryan

On Sat, Apr 17, 2010 at 9:05 AM, Tomas M. \<

---

<div class="post-metadata">

**Author:** ![ryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://www.ruby-forum.com/u/ryan)\
**Post date:** [April 17, 2010, 6:14pm UTC](https://www.ruby-forum.com/t/code-review-etc-module-for-mono/187109/4 "2010-04-17T18:14:13Z")

</div>

In irtests.rb: We already have an environment variable ROWAN\_RUNTIME  
that is used to run tests on Mono. No need to add cmd\_prefix. Just in  
your dev.sh set ROWAN\_RUNTIME to â€œmonoâ€. Why do you need to set  
debug\_folder to mono\_debug?  
Why couldnâ€™t mono build to the same folders (Debug/V4 Debug) as on  
Windows?

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Ryan R.  
Sent: Friday, April 16, 2010 11:40 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Code Review: Etc module for Mono

Many thanks to Ivan for his dev.sh, ir.sh, and help with many of the  
implementation details. Gotta give credit where credit is due. The bad  
Ruby idioms will all be due to me, so just let me know what you need me  
to change. 🙂

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/)

On Fri, Apr 16, 2010 at 11:35 PM, Ryan R.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> **[GitHub - panesofglass/ironruby: Microsoft's Ruby language compiler that is...](https://github.com/panesofglass/ironruby)**
>
> Microsoft's Ruby language compiler that is built on top of the Dynamic Language Runtime. - GitHub - panesofglass/ironruby: Microsoft's Ruby language compiler that is built on top of the ...

git diff attached

- Implements the Etc module for Mono
- Adds RubySpec updates for the Etc library
- Additional updates (dev.sh, ir.sh, many path-related changes) to allow  
\*nix devs to run irtests, though this isn’t complete.

Regards,

Ryan R.

---

<div class="post-metadata">

**Author:** ![ryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://www.ruby-forum.com/u/ryan)\
**Post date:** [April 19, 2010, 12:17am UTC](https://www.ruby-forum.com/t/code-review-etc-module-for-mono/187109/5 "2010-04-19T00:17:22Z")

</div>

When I build on mono with rake compile, the debug folder created is  
called  
mono\_debug. I don’t think I added that myself, just in the irtest.rb  
file.  
As to the ROWAN\_RUNTIME, where is that set? I don’t see it in the  
Dev.bat  
file.

Thanks,

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:** ![ryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://www.ruby-forum.com/u/ryan)\
**Post date:** [April 19, 2010, 3:27am UTC](https://www.ruby-forum.com/t/code-review-etc-module-for-mono/187109/6 "2010-04-19T03:27:00Z")

</div>

If you pass mono arguments to dev.bat it will set it like so:

REM – Mono  
if “%1” == “mono” (  
set ROWAN\_RUNTIME=mono  
if NOT EXIST %2\mono.exe (  
echo Error: Mono Runtime not found at %2  
goto END  
)  
)  
REM Do not encapsulate this if-statement in parentheses, they might  
interact with %PATH% if it contains (x86):  
if “%1” == “mono” set PATH=%PATH%;%2

So on Windows you can have 2 shortcuts: one for Mono environment and one  
for .NET environment.

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Ryan R.  
Sent: Sunday, April 18, 2010 3:16 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Code Review: Etc module for Mono

When I build on mono with rake compile, the debug folder created is  
called mono\_debug. I don’t think I added that myself, just in the  
irtest.rb file. As to the ROWAN\_RUNTIME, where is that set? I don’t see  
it in the Dev.bat file.

Thanks,

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/)

On Sun, Apr 18, 2010 at 2:13 PM, Ryan R.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
Given that I couldn’t run tests on Mono and I couldn’t figure out how  
ROWAN\_RUNTIME was used, I went with the cmd\_prefix. I can strip that  
back off. As to the mono\_debug folder, you’ll need to ask Ivan. I think  
I added the explicit use of that folder, but that’s the folder to which  
the mono build was compiling. I’ll check into it again.

Regards,

Ryan  
On Sat, Apr 17, 2010 at 9:05 AM, Tomas M.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\>  
wrote:  
In irtests.rb: We already have an environment variable ROWAN\_RUNTIME  
that is used to run tests on Mono. No need to add cmd\_prefix. Just in  
your dev.sh set ROWAN\_RUNTIME to â€œmonoâ€. Why do you need to set  
debug\_folder to mono\_debug?  
Why couldnâ€™t mono build to the same folders (Debug/V4 Debug) as on  
Windows?

Tomas

From:  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto: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 Ryan R.  
Sent: Friday, April 16, 2010 11:40 PM

To: removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Ironruby-core] Code Review: Etc module for Mono

Many thanks to Ivan for his dev.sh, ir.sh, and help with many of the  
implementation details. Gotta give credit where credit is due. The bad  
Ruby idioms will all be due to me, so just let me know what you need me  
to change. 🙂

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/)  
On Fri, Apr 16, 2010 at 11:35 PM, Ryan R.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
[GitHub - panesofglass/ironruby: Microsoft's Ruby language compiler that is built on top of the Dynamic Language Runtime.](http://github.com/panesofglass/ironruby)  
git diff attached

- Implements the Etc module for Mono
- Adds RubySpec updates for the Etc library
- Additional updates (dev.sh, ir.sh, many path-related changes) to allow  
\*nix devs to run irtests, though this isn’t complete.

Regards,

Ryan R.

* * *

Ironruby-core mailing list  
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)
