Skip to content

Fix an error when calling a method implemented in C by super() with argu...#2641

Merged
matz merged 1 commit intomruby:masterfrom
sdottaka:super-fix
Nov 19, 2014
Merged

Fix an error when calling a method implemented in C by super() with argu...#2641
matz merged 1 commit intomruby:masterfrom
sdottaka:super-fix

Conversation

@sdottaka
Copy link
Copy Markdown
Contributor

This PR fixes an error when calling a method implemented in C by super() with some arguments .
It makes the following code workable:

Expected:

class MRBTime < Time; def self.new; super(2012, 4, 21); end; end
MRBTime.new # => Sat Apr 21 00:00:00 2012

Actual:

class MRBTime < Time; def self.new; super(2012, 4, 21); end; end
MRBTime.new # => can't convert nil into Integer (TypeError)

…rguments. This fix makes the following code workable:

Expected:

class MRBTime < Time; def self.new; super(2012, 4, 21); end; end
MRBTime.new # => Sat Apr 21 00:00:00 2012

Actual:

class MRBTime < Time; def self.new; super(2012, 4, 21); end; end
MRBTime.new # => can't convert nil into Integer (TypeError)
matz added a commit that referenced this pull request Nov 19, 2014
Fix an error when calling a method implemented in C by super() with argu...
@matz matz merged commit 88195a7 into mruby:master Nov 19, 2014
@matz
Copy link
Copy Markdown
Member

matz commented Nov 19, 2014

Thank you for fixing!

@sdottaka
Copy link
Copy Markdown
Contributor Author

Thank you for merging!

@sdottaka sdottaka deleted the super-fix branch December 12, 2014 03:09
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