Skip to content

split ruby_curl_easy_new function into separate allocate and initiali…#329

Merged
taf2 merged 1 commit intotaf2:masterfrom
gcz1:master
Jan 3, 2018
Merged

split ruby_curl_easy_new function into separate allocate and initiali…#329
taf2 merged 1 commit intotaf2:masterfrom
gcz1:master

Conversation

@gcz1
Copy link
Copy Markdown
Contributor

@gcz1 gcz1 commented Oct 15, 2017

Version 0.9.4 does not allow a subclass to have different number or order of arguments to the base class.

E.g.

`class Derived < Curl::Easy
def initialize(url,foo,bar)
super(url)
end
end

c = Derived.new(nil,1,2)`

gives the following error:

in `new': wrong number of arguments (given 3, expected 0..1) (ArgumentError)

This modification splits ruby_curl_easy_new() into separate allocate and initialize functions
which allows the above code to work.

note some differences are just my editor removing trailing blanks from lines.

@taf2 taf2 merged commit e25fe6d into taf2:master Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants