Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd behaviour when using "super" #2395

Closed
IceDragon200 opened this issue Jun 14, 2014 · 3 comments
Closed

Odd behaviour when using "super" #2395

IceDragon200 opened this issue Jun 14, 2014 · 3 comments

Comments

@IceDragon200
Copy link
Contributor

Currently using the HEAD 0042e58

The following code will produce this error:

trace:
    [2] super-bug.rb:9:in State.render
    [1] super-bug.rb:22:in State::Splash.render
    [0] super-bug.rb:32
super-bug.rb:22: can't convert Float into Proc (TypeError)

Test Code:

class State

  def update(delta)
    #
  end

  def render

  end

end

class State::Splash < State

  def offset
    48
  end

  def render
    x = 100 / 2
    y = 200 - offset
    super
  end

  def update(delta)
    super delta
  end

end

State::Splash.new.render

This was done with a fresh build from master.

I've tested this code against an older commit of mruby 8e4d3bb and it works correctly.

@cremno
Copy link
Contributor

cremno commented Jun 14, 2014

Caused by b5ef16b (#2344).

@IceDragon200
Copy link
Contributor Author

Yeah, I just found it as well. Thanks for the response.

@matz
Copy link
Member

matz commented Jun 24, 2014

closed by #2333

@matz matz closed this as completed Jun 24, 2014
matz added a commit that referenced this issue Jun 24, 2014
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

No branches or pull requests

3 participants