Project

General

Profile

Actions

Feature #5112

closed

Remove inadvertent symbol creation from send, __send__, and public_send

Added by jeremyevans0 (Jeremy Evans) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:38576]

Description

When I was first working on the inadvertent symbol creation removal code, I didn't think it was possible to handle send because method_missing requires a symbol as the first argument. But once I figured out how to handle the similar situation in respond_to? for respond_to_missing? (and used the same technique with const_get for const_missing), the same idea works for the send methods. Basically, if method_missing has been overridden, you must create the symbol, but if not, you can just raise a NoMethodError without creating the symbol.

I didn't add a test for it since I saw the tests for const_get and respond_to? were commented out in r32710 and r32711.


Files


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #5072: Avoid inadvertent symbol creation in reflection methodsClosednobu (Nobuyoshi Nakada)07/25/201107/25/2011Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0