redns 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/lib/redns/buffer.rb CHANGED
@@ -40,7 +40,7 @@ class ReDNS::Buffer < String
40
40
  def unpack(format)
41
41
  return [ ] if (@size <= 0)
42
42
 
43
- raise ReDNS::Exception::BufferUnderrun if (@offset > total_length)
43
+ return if (@offset > total_length)
44
44
 
45
45
  data = to_s.unpack(format)
46
46
  advance(data.pack(format).length)
@@ -52,7 +52,7 @@ class ReDNS::Buffer < String
52
52
  end
53
53
 
54
54
  def read(chars = 1)
55
- raise ReDNS::Exception::BufferUnderrun if (@offset + chars > total_length)
55
+ return if (@offset + chars > total_length)
56
56
 
57
57
  result = to_str[@offset, chars]
58
58
  advance(chars)
data/redns.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{redns}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["tadman"]
@@ -11,14 +11,7 @@ class TestReDNSBuffer < Test::Unit::TestCase
11
11
  assert buffer.empty?
12
12
  assert !buffer.inspect.empty?
13
13
 
14
- rescued = nil
15
-
16
- begin
17
- assert '', buffer.read
18
- rescue Object => rescued
19
- end
20
-
21
- assert_equal ReDNS::Exception::BufferUnderrun, rescued.class
14
+ assert_equal nil, buffer.read
22
15
  end
23
16
 
24
17
  def test_simple_duplicate
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - tadman