epitools 0.5.54 → 0.5.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fcddb5cf0745cf3cbedb55debe44c07d22447cdb
4
- data.tar.gz: 8bdb45f8597932ab24e74624932257d6674c9199
3
+ metadata.gz: 147bfa8d564c4f6e84d969ad3c283004c2db2ffc
4
+ data.tar.gz: 5e81187a0567ae2007fb75da433bfb1dae9b53b2
5
5
  SHA512:
6
- metadata.gz: dbee97e02411f51380fbc21ba849d257a0bbb44eb932b72e22ac9d9610db4d9183ca4a3179919d85b5e61375900cf736d81549390278d0d4d2c3ce4ccad12fe3
7
- data.tar.gz: ed5a46223323cadb816d17ef137a176a0429c4637d225efcca647adecd5f3357e7e000c44f9aa1cfaf9dbdc253d4e6aa21d33eab9d4c4d89e61206c9dc162b09
6
+ metadata.gz: b7af6a01c40cb110947c9f2647032e4ad1d5c5873d9ab6402ac873eb6dbbd24c89d218335d8026f9d4f3c6038c17e341998abefc7fa04c13d9562ebee2e1fd57
7
+ data.tar.gz: cc1f0733b2f27c3c5fe42bac7b4b6490db08502609fde10877029b6c424b411d764d34f3c8b57d80f766d1ba5ef6633a0095a3b9394022e71a7cd0faed3cf3a3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.54
1
+ 0.5.55
@@ -60,7 +60,7 @@ class File
60
60
  seek(start_pos)
61
61
 
62
62
  while data = reverse_read(4096)
63
- lines = data.lines
63
+ lines = data.each_line.to_a
64
64
  lines.last << fragment unless lines.last[-1] == "\n"
65
65
 
66
66
  fragment = lines.first
@@ -305,6 +305,17 @@ end
305
305
  end
306
306
 
307
307
  end
308
+
309
+ #
310
+ # Convert the integer into its sequence of bytes (little endian format: lowest-order-byte first)
311
+ #
312
+ def bytes
313
+ nbytes = (bit_length / 8.0).ceil
314
+
315
+ (0..nbytes).map do |current_byte|
316
+ (self >> (8 * current_byte)) & 0xFF
317
+ end
318
+ end
308
319
 
309
320
  end
310
321
 
@@ -462,6 +462,12 @@ class String
462
462
 
463
463
  end # unless public_method_defined? :to_proc
464
464
 
465
+
466
+ def highlight(type=nil)
467
+ # Coderay highlighting
468
+ end
469
+ alias_method :syntax_highlight, :highlight
470
+
465
471
  end
466
472
 
467
473
 
@@ -1,12 +1,10 @@
1
- # Alias "Enumerator" to "Enum"
2
- if RUBY_VERSION["1.8"]
1
+ if RUBY_VERSION[/^1.8/]
3
2
  require 'enumerator'
4
3
  Enumerator = Enumerable::Enumerator unless defined? Enumerator
5
4
  end
6
5
 
7
6
  RbConfig = Config unless defined? RbConfig
8
7
 
9
-
10
8
  class Object
11
9
 
12
10
  unless defined?(__DIR__)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epitools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.54
4
+ version: 0.5.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - epitron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-15 00:00:00.000000000 Z
11
+ date: 2014-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec