3 ms·
Fun! This can also be found as a general array accessor: https://github.com/rails/rails/blob/ed03d4eaa89a7b4ab09e7f5da76b522d04650daf/activesupport/lib/active_
by cookrn 12y ago
Fun! This can also be found as a general array accessor:
https://github.com/rails/rails/blob/ed03d4eaa89a7b4ab09e7f5da76b522d04650daf/activesupport/lib/active_support/core_ext/array/access.rb#L58-L63 https://github.com/rails/rails/blob/ed03d4eaa89a7b4ab09e7f5d...
Here's another interesting one from ActiveSupport giving Ruby Numerics the ability to be treated as various quantities of bytes:
https://github.com/rails/rails/blob/9eeb5fed2ff8e781e56202f62b125bfadc486999/activesupport/lib/active_support/core_ext/numeric/bytes.rb https://github.com/rails/rails/blob/9eeb5fed2ff8e781e56202f6...