Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Working through regular expressions.

  • Loading branch information...
commit a3ab74459f313084f26d174c02f2605a2b5bc606 1 parent cbf7a19
@danishkhan authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 koans/about_regular_expressions.rb
View
4 koans/about_regular_expressions.rb
@@ -146,11 +146,11 @@ def test_a_vertical_pipe_means_or
# ------------------------------------------------------------------
def test_scan_is_like_find_all
- assert_equal __, "one two-three".scan(/\w+/)
+ assert_equal ["one", "two", "three"], "one two-three".scan(/\w+/)
end
def test_sub_is_like_find_and_replace
- assert_equal __, "one two-three".sub(/(t\w*)/) { $1[0, 1] }
+ assert_equal "one t-three", "one two-three".sub(/(t\w*)/) { $1[0, 1] }
end
def test_gsub_is_like_find_and_replace_all
Please sign in to comment.
Something went wrong with that request. Please try again.