Sha256: 510c9ffa0ec8bd5281631b06f26e7eb6bdff7aa8b79780797f173d0a74182ff6

Contents?: true

Size: 241 Bytes

Versions: 41

Compression:

Stored size: 241 Bytes

Contents

class Integer
  # 32-bit left shift 
  def js_shl(count)
    v = (self << count) & 0xffffffff
    v > 2**31 ? v - 2**32 : v
  end

  # 32-bit zero-fill right shift  (>>>)
  def js_shr_zf(count)
    self >> count & (2**(32-count)-1)
  end
end

Version data entries

41 entries across 41 versions & 4 rubygems

Version Path
artfully_ose-1.3.0.pre4 lib/d2s3/patch/integer.rb
artfully_ose-1.3.0.pre3 lib/d2s3/patch/integer.rb
artfully_ose-1.3.0.pre2 lib/d2s3/patch/integer.rb
artfully_ose-1.3.0.pre1 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.beta.1 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.alpha.2 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.alpha.1 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.pre.27 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.pre.26 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.pre.24 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.pre.23 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.pre.21 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.pre.20 lib/d2s3/patch/integer.rb
s3_swf_upload-0.3.3 lib/patch/integer.rb
artfully_ose-1.2.0.pre.19 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.pre.18 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.pre.17 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.pre.16 lib/d2s3/patch/integer.rb
artfully_ose-1.2.0.pre.15 lib/d2s3/patch/integer.rb