Permalink
Browse files

Fix xmpfilter for 1.9

  • Loading branch information...
1 parent 6216334 commit 07ab30886f3110426e5d2e25eae016f427255d40 @manveru committed Jun 17, 2009
Showing with 5 additions and 5 deletions.
  1. +5 −5 xmpfilter.rb
View
10 xmpfilter.rb
@@ -164,12 +164,12 @@ def extract_data(output)
def final_decoration(code, output)
warnings = {}
- output.join.grep(WARNING_RE).map do |x|
+ output.join.lines.grep(WARNING_RE).map do |x|
md = WARNING_RE.match(x)
warnings[md[1].to_i] = md[2]
end
idx = 0
- ret = code.map do |line|
+ ret = code.lines.map do |line|
w = warnings[idx+=1]
if @warnings
w ? (line.chomp + " # !> #{w}") : line
@@ -425,8 +425,8 @@ def _handle_keywords(expr_orig, column)
def aref_or_aset?(right_stripped, last_char)
if last_char == ?[
case right_stripped
- when /\]\s*=/: "[]="
- when /\]/: "[]"
+ when /\]\s*=/; "[]="
+ when /\]/; "[]"
end
end
end
@@ -941,7 +941,7 @@ def doc(code, lineno, column=nil)
:use_parentheses => !options.poetry)
case options.mode
- when :marker : puts xmp.add_markers(targetcode, options.min_codeline_size)
+ when :marker ; puts xmp.add_markers(targetcode, options.min_codeline_size)
when :annotation, :unittest, :rspec
puts xmp.annotate(targetcode)
when :completion, :completion_emacs, :completion_vim

0 comments on commit 07ab308

Please sign in to comment.