Created
September 11, 2019 12:34
-
-
Save irridescentrambler/ad125d8b190a48f9bf2e67b87019c698 to your computer and use it in GitHub Desktop.
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
[1,2,3,4,5].method(:length).source_location | |
#=> nil | |
"Ruby".method(:concat).source_location | |
#=> nil | |
class Array | |
def subset?(sub_array) | |
sub_array.each do |element| | |
return false unless self.include?(element) | |
end | |
true | |
end | |
end | |
[1,2,3,4].method(:subset?).source_location | |
#=> ['source_location_demo_1.rb', 8] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment