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

Implement Proc#* and Method#* for Proc and Method composition #935

Closed
wants to merge 3 commits into from

Commits on Oct 11, 2016

  1. proc.c: Implement Proc#* for Proc composition

    * proc.c (proc_compose): Implement Proc#* for Proc composition, enabling
      composition of Procs and Methods. [Feature ruby#6284]
    
    * test/ruby/test_proc.rb: Add test cases for Proc composition.
    mudge committed Oct 11, 2016
    Configuration menu
    Copy the full SHA
    59bd09a View commit details
    Browse the repository at this point in the history
  2. proc.c: Implement Method#* for Method composition

    * proc.c (rb_method_compose): Implement Method#* for Method composition,
      which delegates to Proc#*.
    
    * test/ruby/test_method.rb: Add test cases for Method composition.
    mudge committed Oct 11, 2016
    Configuration menu
    Copy the full SHA
    7522131 View commit details
    Browse the repository at this point in the history
  3. proc.c: Support any callable when composing Procs

    * proc.c (proc_compose): support any object with a call method rather
      than supporting only procs. [Feature ruby#6284]
    
    * proc.c (compose): use the function call on the given object rather
      than rb_proc_call_with_block in order to support any object.
    
    * test/ruby/test_proc.rb: Add test cases for composing Procs with
      callable objects.
    
    * test/ruby/test_method.rb: Add test cases for composing Methods with
      callable objects.
    mudge committed Oct 11, 2016
    Configuration menu
    Copy the full SHA
    c525e85 View commit details
    Browse the repository at this point in the history