Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Super from singleton method that is defined to multiple classes is not supported"

I'm trying to use the Steam Condenser library with Ruby 1.9.2 and Rails 3.

I have the following code:

require "steam/servers/source_server" 

class HomeController < ApplicationController
  def index
    server = SourceServer.new(IPAddr.new("127.0.0.1"), 2000)
    server.init

    @m = server.get_players
  end
end

but for some reason it throws:

super from singleton method that is defined to multiple classes is not supported; this will be fixed in 1.9.3 or later

... on line 5: server = SourceServer.new(IPAddr.new("127.0.0.1"), 2000).

How to fix this?

like image 975
Alon Gubkin Avatar asked Jan 27 '26 20:01

Alon Gubkin


1 Answers

I'm the creator of Steam Condenser.

This is a shortcoming of Ruby 1.9.2 (as mentioned in the error message). There's already a workaround for this issue.

A real fix (eliminating the unusual Ruby code) will be made soon.

like image 81
Koraktor Avatar answered Jan 30 '26 15:01

Koraktor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!