-
Notifications
You must be signed in to change notification settings - Fork 43
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
Exclude Proc#source Enclosure #26
Comments
It'll be quite hard. The way we currently do this is find the first line of the method, and then extract one complete expression from ruby. To get it without the begin end, it might be sufficient to drop the last |
Eh, that's what I was afraid of. I may work on a solution for easy cases. If so I'll be sure to send a PR along. |
There's a crazy gem called sourcify which uses its own ragel scanner to do this accurately, you might get some mileague with that ;) |
Tried sourcify before method_source. It failed anytime a string was defined with double quotes. Simple is better, I think. |
Hit a case where I need the Proc source without the enclosure. For example:
p.source
currently gives me all three lines, but I really want:There doesn't appear to be a way to do this. Possible to add?
The text was updated successfully, but these errors were encountered: