Fixed namespace issue + added some infrastructure#1
Open
renra wants to merge 2 commits intoniklasb:masterfrom
Open
Fixed namespace issue + added some infrastructure#1renra wants to merge 2 commits intoniklasb:masterfrom
renra wants to merge 2 commits intoniklasb:masterfrom
Conversation
Owner
|
Wow, great work! Didn't know anybody was actually still using this :) Would you mind giving a quick overview of what your changes are? I haven't touched Ruby for like 5 years... Looks pretty good though! |
Author
|
Hey @niklasb Your implementation saved my day actually! I have put the explanation to the PR description. I kept polishing up further and ended up with this simplified version which is all that I need. I published it to rubygems as Thanks for putting this together! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes:
Test coverage
Fixed one namespace problem that I found when I was playing around with the original library. The following call to
LookupStackis already outside of theDynamicBindingmodule and so it needs to be referenced like this:DynamicBinding::LookupStackhttps://github.com/niklasb/ruby-dynamic-binding/blob/master/lib/dynamic_binding.rb#L61
Split the implementation into two files so that users can choose what to import (for example not everybody might want to monkey-patch
Proc). Requiring justdynamic_bindingwill require everything - that is reverse-compatible - but I could require justdynamic_binding/lookup_stackif I wanted