[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby dbi error

Daniel Bretoi

10/24/2003 9:13:00 PM

Hi,

Does anyone know what causes this error?

/usr/lib/ruby/1.6/dbi/dbi.rb:318: warning: method redefined; discarding
old fraction

ruby 1.6.8 (2003-07-09) [i386-linux]

[/usr/lib/ruby]$ grep -r "def fraction" *
1.6/dbi/dbi.rb: def fraction() @fraction || 0 end


Other than the warning, the program using "require 'dbi'" executes
as expected.


db

--

1 Answer

Michael Neumann

10/25/2003 6:59:00 AM

0

On Sat, Oct 25, 2003 at 06:13:25AM +0900, Daniel Bretoi wrote:
> Hi,
>
> Does anyone know what causes this error?
>
> /usr/lib/ruby/1.6/dbi/dbi.rb:318: warning: method redefined; discarding
> old fraction
>
> ruby 1.6.8 (2003-07-09) [i386-linux]
>
> [/usr/lib/ruby]$ grep -r "def fraction" *
> 1.6/dbi/dbi.rb: def fraction() @fraction || 0 end
>
>
> Other than the warning, the program using "require 'dbi'" executes
> as expected.

This warning is fixed in CVS -current.

Do you see the "attr_accessor :fraction" call some lines before the
definition of the fraction method in dbi.rb? It's now "attr_writer
:fraction" to avoid exactly this warning.

Regards,

Michael