It was not a method at all. It was here:

https://github.com/opf/openproject/pull/1053/files#diff-f1d36687c4c649ebbb025139ed60ff37L76

With creating such method, we are able to remove long inline regexp:

```ruby
-    @tokens = @question.scan(%r{((\s|^)"[\s\w]+"(\s|$)|\S+)}).collect {|m| m.first.gsub(%r{(^\s*"\s*|\s*"\s*$)}, '')}
 +    @tokens = @question.scan_query_tokens
```

Maybe it is not very wise to add this method to ```String``` class. It might be done as helper method, so, it will look like:

```ruby
-    @tokens = @question.scan(%r{((\s|^)"[\s\w]+"(\s|$)|\S+)}).collect {|m| m.first.gsub(%r{(^\s*"\s*|\s*"\s*$)}, '')}
 +    @tokens = scan_query_tokens @question
```