Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [PATCH] more 1.9 warning fixes

Reply
Thread Tools

[PATCH] more 1.9 warning fixes

 
 
Eric Hodel
Guest
Posts: n/a
 
      12-23-2007
May I apply these patches?

@sspi_enable is not initialized in lib/net/http.rb

pos is shadowed in IRB::OutputFormat#foo, but I don't see where foo is
called at all, so I removed the method. If #foo is actually used,
removing 'pos = 0' would be sufficient.

Index: lib/net/http.rb
================================================== =================
--- lib/net/http.rb (revision 14512)
+++ lib/net/http.rb (working copy)
@@ -485,6 +485,7 @@ module Net #:nodoc:
@ssl_context = nil
@enable_post_connection_check = true
@compression = nil
+ @sspi_enabled = false
end

def inspect
Index: lib/irb/output-method.rb
================================================== =================
--- lib/irb/output-method.rb (revision 14512)
+++ lib/irb/output-method.rb (working copy)
@@ -45,21 +45,6 @@ module IRB
return format, opts if $1.size % 2 == 1
end

- def foo(format)
- pos = 0
- inspects = []
- format.scan(/%[#0\-+ ]?(\*(?=[^0-9])|\*[1-9][0-9]*\$|[1-9]
[0-9]*(?=[^0-9]))?(\.(\*(?=[^0-9])|\*[1-9][0-9]*\$|[1-9][0-9]*(?
=[^0-9])))?(([1-9][0-9]*\$)*)([diouxXeEfgGcsb%])/) {|f, p, pp, pos,
new_pos, c|
- puts [f, p, pp, pos, new_pos, c].join("!")
- pos = new_pos if new_pos
- if c == "I"
- inspects.push pos.to_i
- (f||"")+(p||"")+(pp||"")+(pos||"")+"s"
- else
- $&
- end
- }
- end
-
def puts(*objs)
for obj in objs
print(*obj)



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PIX problem - clear xlate fixes connectivity Ben Beechick Cisco 1 10-15-2005 10:19 PM
Master Pages, seems like it causes more problems than it fixes? multiformity@gmail.com ASP .Net 14 10-12-2005 02:59 PM
[ANN] Rails 0.11.1: More Ajax, Verifications, SQL Server updated, loads of fixes David Heinemeier Hansson Ruby 0 03-27-2005 03:37 PM
Access is denied error - tried some fixes Edward ASP .Net 1 12-08-2004 01:48 PM
TCP vulnerability fixes? Brian Bergin Cisco 0 04-21-2004 09:02 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57