# Update on specs and String

**URL:** <https://www.ruby-forum.com/t/update-on-specs-and-string/134575>\
**Category:** IronRuby\
**Created:** [April 12, 2008, 8:24am UTC](https://www.ruby-forum.com/t/update-on-specs-and-string/134575 "2008-04-12T08:24:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_LSSIRONRUBY](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/4491bb/32.png) [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Post date:** [April 12, 2008, 8:24am UTC](https://www.ruby-forum.com/t/update-on-specs-and-string/134575/1 "2008-04-12T08:24:41Z")

</div>

I’ve spent the better part of this week working on String with the  
targeted goal of implementing the subset of String that’s required to  
run Rails. Below is a list of the methods that we see Rails using, and  
the specs that are passing as of tonight.

I haven’t really done anything with %, delete, tr, and unpack which  
reflects their low pass rate. In many of the cases where we are almost  
at 100%, we aren’t passing the specs that require us to return a  
subclass of String where the method (eg gsub) is invoked on the subclass  
of String. This is pretty strange behavior that Rails doesn’t appear to  
use (they monkey patch String rather than deriving from it), so our pass  
rate is actually quite a lot higher than it might appear right now  
(70%). So getting subclass behavior correct is going to be a low  
priority thing for the foreseeable future.

In any event, this shelveset isn’t quite ready to ship yet, but I  
thought I’d update folks with progress so that you can see where we’re  
at as of tonight. This should get checked in sometime next week.

Thanks,  
-John

name pass total %  
% 31 69 45%

- 

```
          6 6 100%

```

- 

```
          4 4 100%

```

\<=\> == 9 11 82%  
[] 77 89 87%  
chop 9 10 90%  
concat 9 10 90%  
delete 0 11 0%  
downcase[!] 6 7 86%  
dump 3 4 75%  
each 7 10 70%  
empty? 1 1 100%  
gsub[!] 25 38 66%  
hash 1 1 100%  
inspect 2 3 67%  
length 1 1 100%  
match[=~] 11 11 100%  
replace 5 5 100%  
scan 11 15 73%  
size 1 1 100%  
split 24 27 89%  
strip[!] 4 5 80%  
sub[!] 25 39 64%  
to\_i 10 12 83%  
to\_s 2 3 67%  
to\_str 2 3 67%  
to\_sym 1 2 50%  
tr 0 11 0%  
unpack 0 1 0%  
upcase[!] 6 7 86%  
293 417 70%
