rdo-postgres 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,5 +7,6 @@ script: "CONNECTION=postgres://rdo:rdo@127.0.0.1/rdo?encoding=utf-8 bundle exec
7
7
  rvm:
8
8
  - 1.9.2
9
9
  - 1.9.3
10
+ - rbx-19mode
10
11
  notifications:
11
12
  email: chris@w3style.co.uk
@@ -52,18 +52,6 @@
52
52
  #define RDO_RESULT(tuples, info) \
53
53
  (rb_funcall(rb_path2class("RDO::Result"), rb_intern("new"), 2, tuples, info))
54
54
 
55
- /**
56
- * Wrap the given StatementExecutor in a RDO::Statement.
57
- *
58
- * @param VALUE
59
- * any object that responds to #command and #execute
60
- *
61
- * @return VALUE
62
- * an RDO::Statement
63
- */
64
- #define RDO_STATEMENT(executor) \
65
- (rb_funcall(rb_path2class("RDO::Statement"), rb_intern("new"), 1, executor))
66
-
67
55
  /**
68
56
  * Convert a C string to a ruby String.
69
57
  *
@@ -77,7 +65,8 @@
77
65
  * a Ruby String
78
66
  */
79
67
  #define RDO_STRING(s, len, enc) \
80
- (rb_enc_associate_index(rb_str_new(s, len), enc > 0 ? enc : 0))
68
+ (rb_enc_associate_index(rb_str_new(s, len), \
69
+ enc > 0 ? enc : rb_enc_find_index("binary")))
81
70
 
82
71
  /**
83
72
  * Convert a C string to a ruby String, assuming possible NULL bytes.
@@ -91,7 +80,8 @@
91
80
  * @return VALUE (String)
92
81
  * a Ruby String
93
82
  */
94
- #define RDO_BINARY_STRING(s, len) (rb_str_new(s, len))
83
+ #define RDO_BINARY_STRING(s, len) \
84
+ (RDO_STRING(s, len, rb_enc_find_index("binary")))
95
85
 
96
86
  /**
97
87
  * Convert a C string to a Fixnum.
@@ -7,6 +7,6 @@
7
7
 
8
8
  module RDO
9
9
  module Postgres
10
- VERSION = "0.0.8"
10
+ VERSION = "0.0.9"
11
11
  end
12
12
  end
@@ -75,7 +75,8 @@ describe RDO::Postgres::Array::Float do
75
75
  let(:str) { '{NaN,7.2}' }
76
76
 
77
77
  it "uses Float::NAN as the value" do
78
- arr.to_a.should == [Float::NAN, 7.2]
78
+ arr.to_a[0].should be_nan
79
+ arr.to_a[1].should == 7.2
79
80
  end
80
81
  end
81
82
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdo-postgres
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: