Skip to content

Commit

Permalink
Fix String#each_line and String#lines specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
BanzaiMan committed Jun 8, 2010
1 parent 69f4953 commit 602c1f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion spec/tags/1.9/ruby/core/string/each_line_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/tags/1.9/ruby/core/string/lines_tags.txt

This file was deleted.

3 changes: 3 additions & 0 deletions src/org/jruby/RubyString.java
Expand Up @@ -6616,6 +6616,9 @@ private IRubyObject each_lineCommon19(ThreadContext context, IRubyObject sep, Bl
block.yield(context, this); block.yield(context, this);
return this; return this;
} }
if (! sep.respondsTo("to_str")) {
throw runtime.newTypeError("can't convert " + sep.getMetaClass() + " into String");
}


ByteList val = value.shallowDup(); ByteList val = value.shallowDup();
int p = val.getBegin(); int p = val.getBegin();
Expand Down

0 comments on commit 602c1f2

Please sign in to comment.