Project

General

Profile

Actions

Bug #10277

closed

Ampersand to_proc issues

Added by jridgewell (Justin Ridgewell) about 10 years ago. Updated about 10 years ago.

Status:
Rejected
Assignee:
-
Target version:
ruby -v:
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
[ruby-core:65197]

Description

I'm noticing weird inconsistencies when when returning a bound method in the #to_proc method when using &instance_object. When returning the bound method from #to_proc, it'll raise an error ("wrong argument type AmpersandMethod (expected Proc) (TypeError)", AmpersandMethod being my class name). However, if I explicitly #to_proc the bound method, everything works as normal. I've attached a small ruby script showing the problem.


Files

ampersand-to_proc.rb (635 Bytes) ampersand-to_proc.rb jridgewell (Justin Ridgewell), 09/21/2014 10:26 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0