Skip to content

Commit e1fd7ec

Browse files
Merge pull request #211 from fastruby/remove-wrong-advice-ends_with
Removes wrong advice concerning `end_with?`
2 parents 06c9a00 + 8f7f7d9 commit e1fd7ec

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,10 +1200,6 @@ longer. For short strings, `String#match?` performs similarly to
12001200
> Sometimes you cant replace regexp with `start_with?`, <br>
12011201
> for example: `"a\nb" =~ /^b/ #=> 2` but `"a\nb" =~ /\Ab/ #=> nil`.<br>
12021202
> :warning: <br>
1203-
> You can combine `start_with?` and `end_with?` to replace
1204-
> `error.path =~ /^#{path}(\.rb)?$/` to this <br>
1205-
> `error.path.start_with?(path) && error.path.end_with?('.rb', '')`<br>
1206-
> —— @igas [rails/rails#17316](https://github.com/rails/rails/pull/17316)
12071203
12081204
```
12091205
$ ruby -v code/string/start-string-checking-match-vs-start_with.rb

0 commit comments

Comments
 (0)