ninjudd-tuple 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 0
3
- :patch: 4
3
+ :patch: 5
4
4
  :major: 0
data/ext/extconf.rb CHANGED
@@ -1,5 +1,2 @@
1
1
  require 'mkmf'
2
- # have_library('icui18n')
3
- # have_library('icuio')
4
- # create_makefile('unicode')
5
2
  create_makefile('tuple')
data/ext/tuple.c CHANGED
@@ -29,7 +29,8 @@ static VALUE tuple_dump(VALUE self, VALUE tuple) {
29
29
  u_int32_t digit;
30
30
  BDIGIT *digits;
31
31
 
32
- Check_Type(tuple, T_ARRAY);
32
+ if (TYPE(tuple) != T_ARRAY) tuple = rb_ary_new4(1, tuple);
33
+
33
34
  for (i = 0; i < RARRAY(tuple)->len; i++) {
34
35
  item = RARRAY(tuple)->ptr[i];
35
36
  header[0] = header[1] = header[2] = header[3] = 0;
data/test/tuple_test.rb CHANGED
@@ -12,6 +12,10 @@ class TupleTest < Test::Unit::TestCase
12
12
  assert_equal t, Tuple.load(Tuple.dump(t))
13
13
  end
14
14
 
15
+ should "convert single value into array" do
16
+ assert_equal [1], Tuple.load(Tuple.dump(1))
17
+ end
18
+
15
19
  should "sort tuples using binary" do
16
20
  tuples = [
17
21
  [1, "foo"],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ninjudd-tuple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Balthrop
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-12 00:00:00 -07:00
12
+ date: 2009-08-18 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15