# More 1.9 warning fixes

**URL:** <https://www.ruby-forum.com/t/more-1-9-warning-fixes/123999>\
**Category:** Ruby\
**Created:** [December 23, 2007, 9:11am UTC](https://www.ruby-forum.com/t/more-1-9-warning-fixes/123999 "2007-12-23T09:11:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [December 23, 2007, 9:11am UTC](https://www.ruby-forum.com/t/more-1-9-warning-fixes/123999/1 "2007-12-23T09:11:03Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [December 23, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/more-1-9-warning-fixes/123999/2 "2007-12-23T22:06:37Z")

</div>

Hi,

In message “Re: [PATCH] more 1.9 warning fixes”  
on Sun, 23 Dec 2007 17:10:11 +0900, Eric H.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

|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.

Yes.

```
          matz.

```
