Skip to content

Commit

Permalink
Fix CommandTJump under Ruby 1.9.x
Browse files Browse the repository at this point in the history
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
woahdae authored and wincent committed Dec 18, 2011
1 parent e9a861b commit fb0e58a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ruby/command-t/scanner/jump_scanner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit fb0e58a

Please sign in to comment.