Remove some ruby 1.8.6 hacks for eval with args #865

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@soulcutter
Member

soulcutter commented Apr 9, 2013

I stumbled across some hacks to work around deficiencies in 1.8.6 and started removing them. Interestingly hooks.rb has a call to #instance_eval_with_args that is resisting replacement.

Target for RSpec 3.0

@soulcutter

This comment has been minimized.

Show comment Hide comment
@soulcutter

soulcutter Apr 9, 2013

Owner

I thought this line could be a simple replacement, however it breaks several tests.

I thought this line could be a simple replacement, however it breaks several tests.

This comment has been minimized.

Show comment Hide comment
@soulcutter

soulcutter Apr 9, 2013

Owner

ah HA. There was a different instance_eval_with_args on Example which is not related to the 1.8.6 hack.

Owner

soulcutter replied Apr 9, 2013

ah HA. There was a different instance_eval_with_args on Example which is not related to the 1.8.6 hack.

@soulcutter

This comment has been minimized.

Show comment Hide comment
@soulcutter

soulcutter Apr 9, 2013

Member

Note: There's another opportunity for this same cleanup in rspec-expectations

Member

soulcutter commented Apr 9, 2013

Note: There's another opportunity for this same cleanup in rspec-expectations

@@ -164,7 +162,8 @@ def self.find_and_eval_shared(label, name, *args, &customization_block)
raise ArgumentError, "Could not find shared #{label} #{name.inspect}" unless
shared_block = world.shared_example_groups[name]
- module_eval_with_args(*args, &shared_block)
+ module_exec(*args, &shared_block)
+ #module_eval_with_args(*args, &shared_block)

This comment has been minimized.

Show comment Hide comment
@JonRowe

JonRowe Apr 20, 2013

Member

Any reason why you included a commented out line?

@JonRowe

JonRowe Apr 20, 2013

Member

Any reason why you included a commented out line?

@JonRowe

This comment has been minimized.

Show comment Hide comment
@JonRowe

JonRowe Jun 15, 2013

Member

I may have neglected to remember this when removing 1.8.6 hacks earlier this week, sorry! I'm closing cause it's already done but if you need to reopen go ahead.

Member

JonRowe commented Jun 15, 2013

I may have neglected to remember this when removing 1.8.6 hacks earlier this week, sorry! I'm closing cause it's already done but if you need to reopen go ahead.

@JonRowe JonRowe closed this Jun 15, 2013

@soulcutter

This comment has been minimized.

Show comment Hide comment
@soulcutter

soulcutter Jun 15, 2013

Member

All good! 👍

Member

soulcutter commented Jun 15, 2013

All good! 👍

@soulcutter soulcutter deleted the soulcutter:remove-1_8_6-eval-hacks branch Jun 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment