/foo.rb Secret
Last active
July 20, 2020 17:09
An example for #ruby IRC
This file contains 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
class Foo | |
def initialize(this, that:) | |
@this = this | |
@that = that | |
end | |
end | |
class Foo | |
alias original_initialize initialize | |
def initialize(...) | |
@thread = Thread.current | |
original_initialize(...) | |
end | |
end | |
Foo.new(:this, that: :that) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment