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

fix: initialization fails for classes inherited from script with args #10

Merged
merged 1 commit into from
Jun 28, 2017

Conversation

Pierre-Michard
Copy link
Contributor

example:
class FundingScript < BTC::Script
def initialize( pubkey)
@pubkey = pubkey
super()
end
end

this fails because self.class is FundingScript:

FundingScript.new.p2sh_script

…ments

ex:
class FundingScript < BTC::Script
    def initialize( pubkey)
      @pubkey = pubkey
      super()
    end
end

#this fails because self.class is FundingScript:
FundingScript.new.p2sh_script
@oleganza
Copy link
Owner

Looks good, but it might be that your problem is better solved with encapsulation of Script instance instead of inheritance from it.

@oleganza oleganza merged commit 8f83c25 into oleganza:master Jun 28, 2017
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