[ruby-cvs:73013] nobu:r65913 (trunk): proc.c: Support any callable when composing Procs

nobu at ruby-lang.org nobu at ruby-lang.org
Thu Nov 22 14:51:42 JST 2018


nobu	2018-11-22 14:51:42 +0900 (Thu, 22 Nov 2018)

  New Revision: 65913

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65913

  Log:
    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 #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.
    
    From: Paul Mucur <paul at altmetric.com>

  Modified files:
    trunk/proc.c
    trunk/test/ruby/test_method.rb
    trunk/test/ruby/test_proc.rb


More information about the ruby-cvs mailing list