Ticket #12 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Ruby with warnings enabled causes ArgumentError

Reported by: deveiant Owned by: deveiant
Priority: high Milestone: Markdown 1.0.1
Component: API Version: 1.0.0fc2
Severity: major Keywords: warnings format string
Cc:

Description

Using BlueCloth 1.0.0 (installed via rubygems):

$ ruby -v
ruby 1.8.2 (2004-12-25) [i386-cygwin]

$ cat test.rb
require 'rubygems'
require 'bluecloth'
puts BlueCloth.new("*woo*").to_html

$ ruby test.rb
<p><em>woo</em></p>

$ ruby -w test.rb
/usr/local/lib/ruby/gems/1.8/gems/BlueCloth-1.0.0-/lib/bluecloth.rb:1069: warning: StringScanner#empty? is obsolete;
use #eos? instead
/usr/local/lib/ruby/gems/1.8/gems/BlueCloth-1.0.0-/lib/bluecloth.rb:1069: warning: StringScanner#empty? is obsolete;
use #eos? instead
/usr/local/lib/ruby/gems/1.8/gems/BlueCloth-1.0.0-/lib/bluecloth.rb:969:in `%': too many arguments for format string
(ArgumentError)
        from /usr/local/lib/ruby/gems/1.8/gems/BlueCloth-1.0.0-/lib/bluecloth.rb:969:in `transform_images'
        from /usr/local/lib/ruby/gems/1.8/gems/BlueCloth-1.0.0-/lib/bluecloth.rb:266:in `apply_span_transforms'
        from /usr/local/lib/ruby/gems/1.8/gems/BlueCloth-1.0.0-/lib/bluecloth.rb:731:in `form_paragraphs'
        from /usr/local/lib/ruby/gems/1.8/gems/BlueCloth-1.0.0-/lib/bluecloth.rb:723:in `collect'
        from /usr/local/lib/ruby/gems/1.8/gems/BlueCloth-1.0.0-/lib/bluecloth.rb:723:in `form_paragraphs'
        from /usr/local/lib/ruby/gems/1.8/gems/BlueCloth-1.0.0-/lib/bluecloth.rb:252:in `apply_block_transforms'
        from /usr/local/lib/ruby/gems/1.8/gems/BlueCloth-1.0.0-/lib/bluecloth.rb:204:in `to_html'
        from test.rb:6

Change History

Changed 4 years ago by Martin Hart <martin@…>

  • status changed from new to assigned

Changed 3 years ago by ged

  • status changed from assigned to closed
  • resolution set to fixed

(In [81]) * Fixed bug #12, and cleaned up warnings from changes to StringScanner?. [fixes #12]

Note: See TracTickets for help on using tickets.