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

do not support block handling in element define method [fix #112] #116

Merged
merged 2 commits into from
May 13, 2015

Conversation

ipmsteven
Copy link
Contributor

No description provided.

define_method name do |&block|
define_method name do |&block_for_define_method|
raise ArgumentError, "Cannot pass block to #{name}" if block_for_define_method

ElementProxy.new(klass, self, options, &block)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. Before block referenced the variable local to the define_method block, but now it's referencing the parameter to element.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dtognazzini oh, yeah, I forgot to remove the &block here

@ipmsteven ipmsteven force-pushed the removeElementBlockHandling branch 2 times, most recently from 5ee00fd to 05cda3b Compare May 9, 2015 02:05
@ipmsteven ipmsteven force-pushed the removeElementBlockHandling branch 3 times, most recently from a74476d to 361f85f Compare May 13, 2015 01:32
@ipmsteven ipmsteven force-pushed the removeElementBlockHandling branch from 361f85f to 357c023 Compare May 13, 2015 19:35
dtognazzini added a commit that referenced this pull request May 13, 2015
do not support block handling in element define method [fix #112]
@dtognazzini dtognazzini merged commit b7ebc74 into master May 13, 2015
@dtognazzini dtognazzini deleted the removeElementBlockHandling branch May 13, 2015 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants