Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
[19:08:28][qrush:~/Dev/rubinius] $ bin/mspec spec/ruby/1.8/library/uri/parse_spec.rb ......F......F. 1) URI.parse populates the components of a parsed URI::FTP object FAILED Expected {:scheme=>"ftp", :userinfo=>"anonymous", :host=>"ruby-lang.org", :path=>"pub/ruby/1.8/ruby-1.8.6.tar.bz2", :port=>21, :typecode=>"i"} to equal {:scheme=>"ftp", :userinfo=>"anonymous", :host=>"ruby-lang.org", :path=>"/pub/ruby/1.8/ruby-1.8.6.tar.bz2", :port=>21, :typecode=>"i"} =============================== Here's the info from ftp.rb: # Returns the path from an FTP URI. # # RFC 1738 specifically states that the path for an FTP URI does not # include the / which separates the URI path from the URI host. Example: # # ftp://ftp.example.com/pub/ruby # # The above URI indicates that the client should connect to # ftp.example.com then cd pub/ruby from the initial login directory. # # If you want to cd to an absolute directory, you must include an # escaped / (%2F) in the path. Example: # # ftp://ftp.example.com/%2Fpub/ruby # # This method will then return "/pub/ruby" # def path return @path.sub(/^\//,'').sub(/^%2F/,'/') end ======= Just @path should pass the spec fine!
This paste will be private.
From the Design Piracy series on my blog: