Browse files

Fix CommandTJump under Ruby 1.9.x

The jump scanner pulls in a string jumplist. This worked fine under Ruby
1.8.7, where `String#select` operates in a line-wise fashion. Under Ruby
1.9.x, however, it's a private method and explodes. Using `String#lines`
instead makes things work on both Rubies.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
  • Loading branch information...
1 parent e9a861b commit fb0e58a54a8fb556e80bbc5dcd4ebb748641f81c @woahdae woahdae committed with wincent Dec 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 ruby/command-t/scanner/jump_scanner.rb
View
2 ruby/command-t/scanner/jump_scanner.rb
@@ -31,7 +31,7 @@ class JumpScanner < Scanner
include VIM::PathUtilities
def paths
- jumps_with_filename = jumps.select do |line|
+ jumps_with_filename = jumps.lines.select do |line|
line_contains_filename?(line)
end
filenames = jumps_with_filename[1..-2].map do |line|

0 comments on commit fb0e58a

Please sign in to comment.