I have girc.rb and function.rb
In girc.rg i have :
"something"
text = Gtk::TextView.new
text.editable = false

buffer = text.buffer
buffer.create_tag("blue_bg",
        {"background" => "blue"})
iter = buffer.get_iter_at_offset(0)
buffer.insert(iter, "Hello you, how are ")
buffer.insert_with_tags(iter, "you ?", "blue_bg")
listechan = Gtk::Notebook.new
listechan.append_page(stext,  Gtk::Label.new('_Info', true))
"something"

it's work, a new tab is create

in function.rb i have :

    def addserver(model, server)
        @buffer = Hash.new if @buffer == nil
        @buffer[server] = Array.new if @buffer[server] == nil
        @buffer[server][0] = Gtk::TextView.new
        @buffer[server][0].editable = false
        
        @buffer[server][1] = @buffer[server][0].buffer
        iter = @buffer[server][1].get_iter_at_offset(0)
        @buffer[server][1].insert(iter, "Hello 0")
        @buffer[server][2] = Gtk::ScrolledWindow.new
        @buffer[server][2].add(@buffer[server][0])
        p @buffer[server]
        model.append_page(@buffer[server][2],  Gtk::Label.new('_Info2', true))
    end

and i don't have a new tab when i call the function !!
i call the function in girc.rb with :
addserver(listechan, "irc.xxxxxx.org")

the line p @buffer[server] display : 
[#<Gtk::TextView:0x402418c8 ptr=0x81fbf18>, #<Gtk::TextBuffer:0x402418a0
ptr=0x81fbd60>, #<Gtk::ScrolledWindow:0x40241378 ptr=0x8213c28>]

so why it don't work ??