# Code Review: crit\_argf

**URL:** <https://www.ruby-forum.com/t/code-review-crit-argf/181975>\
**Category:** IronRuby\
**Created:** [January 21, 2010, 2:08am UTC](https://www.ruby-forum.com/t/code-review-crit-argf/181975 "2010-01-21T02:08:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [January 21, 2010, 2:08am UTC](https://www.ruby-forum.com/t/code-review-crit-argf/181975/1 "2010-01-21T02:08:36Z")

</div>

tfpt review “/shelveset:crit\_argf;REDMOND\jdeville”  
Comment :  
cleans up a few critical tags:

- re-patches mock.rb with the patch to remove respond\_to last
- implements a basic implementation of ARGF, there are many holes that  
still need to be filled here, but the basic idea works, and the specs  
are no longer critical.

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [January 21, 2010, 2:53am UTC](https://www.ruby-forum.com/t/code-review-crit-argf/181975/2 "2010-01-21T02:53:04Z")

</div>

Could you add comments “TODO: thread safety” to the added fields. There  
are several places that access them in thread unsafe way.  
Could you also replace  
return  
MutableString.CreateAscii(CommandLineArguments[\_currentFileIndex].ToString());  
with  
// TODO: convert any non-string  
return  
(MutableString)CommandLineArguments[\_currentFileIndex];  
?

Tomas

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [January 21, 2010, 6:38am UTC](https://www.ruby-forum.com/t/code-review-crit-argf/181975/3 "2010-01-21T06:38:57Z")

</div>

Will do.
