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

Proc::new is the one that take the block, not Proc#initialize #1707

Open
ParadoxV5 opened this issue Dec 31, 2023 · 0 comments
Open

Proc::new is the one that take the block, not Proc#initialize #1707

ParadoxV5 opened this issue Dec 31, 2023 · 0 comments

Comments

@ParadoxV5
Copy link
Contributor

May be specific to CRuby; may be a bug.

class MyProc < Proc
  def self.new = super { :new }
  def initialize = super { :initialize }
  
  new.() #=> :new
end
@ParadoxV5 ParadoxV5 changed the title Proc::new is the one that take the block, now Proc#initialize Proc::new is the one that take the block, not Proc#initialize Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant