Sha256: 4a464901ce87b56e5989c435270440b89d62ec443f4652b52432def3e0b3e73d
Contents?: true
Size: 651 Bytes
Versions: 1
Compression:
Stored size: 651 Bytes
Contents
class Array # HACK: # When we define private/protected/public methods, we usually use # Module#private, Module#protected & Module#public methods to set the # access of that method. # But in cases where we define methods not within a class # definition, this fails. To make it work, we define these. Kinda # stupid, i know, but oh well. Maybe need to fix this in the future. def public Rubinius::VariableScope.of_sender.method_visibility = nil end def private Rubinius::VariableScope.of_sender.method_visibility = :private end def protected Rubinius::VariableScope.of_sender.method_visibility = :protected end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fancy-0.10.0 | boot/fancy_ext/array.rb |