M
Mirek
class C
def open()
# how to call global open function from here?
end
end
def open()
# how to call global open function from here?
end
end
class C
def open()
# how to call global open function from here?
end
end
:pen
Mirek said:require 'open-uri'
class C
def open(uri)
:pen(uri)
end
end
o = C.new
o.open('x')
---
open.rb:6: syntax error, unexpected tIDENTIFIER, expecting tCONSTANT
:pen(uri)
^
Mirek said:class C
def open()
# how to call global open function from here?
end
end
Daniel said:Kernel:pen, that's what i was thinking of. Next time i'll actually
*test* stuff before I post an answer for someone
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.