Pinned Loading
-
How to view the entire Rails console...
How to view the entire Rails console history? 1puts Readline::HISTORY.to_a
-
Ruby Integer::MAX and Integer::MIN
Ruby Integer::MAX and Integer::MIN 1class Integer
2N_BYTES = [42].pack('i').size
3N_BITS = N_BYTES * 16
4MAX = 2 ** (N_BITS - 2) - 1
5MIN = -MAX - 1
-
rubocop.rb
rubocop.rb 1# Rubocop's Metrics/AbcSize metric is disabled for
2# this method as Rubocop determines this method to
3# be too complex while there's no way to make it
4# less "complex" without introducing extra methods
5# (which actually will make things _more_ complex).
-
md5.js
md5.js 1MD5 = function(e) {
2function h(a, b) {
3var c, d, e, f, g;
4e = a & 2147483648;
5f = b & 2147483648;
-
pull_request.txt
pull_request.txt 1We have a policy of not adding new methods to Ruby
2core classes unless it would benefit the framework
3implementation or the large majority of
4applications. For most cases I believe the required
5keyword arguments are enough. This is actually the
-
Ruby number formatting
Ruby number formatting 1# g limits the number of displayed digits
2"%.2g" % 1.234 # => 1.2
3"%.2g" % 123 # => 1.2e+02
4"%g" % 1000000000 # => 1e+09
5
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.