Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #798 from sideshowcoder/add_kernel_chop
Add Kernel#chop
  • Loading branch information
alex committed Jul 12, 2013
2 parents 8ecbf96 + 103481c commit 4f8c259
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions lib-topaz/kernel.rb
Expand Up @@ -23,6 +23,11 @@ def <=>(other)
self == other ? 0 : nil
end

def chop
$_.chop!
end
private :chop

def Array(arg)
if ary = Topaz.try_convert_type(arg, Array, :to_ary)
ary
Expand Down
5 changes: 0 additions & 5 deletions spec/tags/core/kernel/chop_tags.txt
@@ -1,7 +1,2 @@
fails:Kernel.chop removes the final character of $_
fails:Kernel.chop removes the final carriage return, newline of $_
fails:#chop is a private method
fails:#chop removes the final character of $_
fails:#chop removes the final carriage return, newline of $_
fails:Kernel.chop removes the final multi-byte character from $_
fails:Kernel#chop removes the final multi-byte character from $_

0 comments on commit 4f8c259

Please sign in to comment.