Skip to content

Comments

Eliminating the use of eval step by step#55

Merged
Skarlso merged 9 commits intomasterfrom
replace_eval_with_send
May 26, 2017
Merged

Eliminating the use of eval step by step#55
Skarlso merged 9 commits intomasterfrom
replace_eval_with_send

Conversation

@Skarlso
Copy link
Collaborator

@Skarlso Skarlso commented May 24, 2017

What's left.

        if pos == (@path.size - 1) && node && allow_eval?
          yield_value(blk, context, key) if instance_eval("node #{@path[pos]}")
        end
  • Implementing && and ||

@Skarlso
Copy link
Collaborator Author

Skarlso commented May 25, 2017

Test runs have become insanely fast.

.............................................

Finished tests in 0.073527s, 612.0201 tests/s, 802.4263 assertions/s.

0.07s from something like 0.5...

each(context, key, pos + 1, &blk) if node == @object
when /^\[(.*)\]$/
handle_wildecard(node, expr, context, key, pos, &blk)
else
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I literary found no use for this code segment.

Let it be said here, if anybody has any problems with this missing segment, submit an issue, and I'll investigate use cases for that part.

@Skarlso Skarlso merged commit a266c08 into master May 26, 2017
@Skarlso Skarlso deleted the replace_eval_with_send branch January 25, 2019 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant