<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -28,7 +28,7 @@ static VALUE rb_trie_get(VALUE self, VALUE key) {
 
 	TrieData data;
     if(trie_retrieve(trie, (TrieChar*)RSTRING(key)-&gt;ptr, &amp;data))
-		return INT2FIX(data);
+		return (VALUE)data;
     else
 		return Qnil;
 }
@@ -43,7 +43,7 @@ static VALUE rb_trie_add(VALUE self, VALUE args) {
 
     VALUE key;
     key = RARRAY(args)-&gt;ptr[0];
-    TrieData value = size == 2 ? NUM2INT(RARRAY(args)-&gt;ptr[1]) : TRIE_DATA_ERROR;
+    TrieData value = size == 2 ? RARRAY(args)-&gt;ptr[1] : TRIE_DATA_ERROR;
     
     if(trie_store(trie, (TrieChar*)RSTRING(key)-&gt;ptr, value))
 		return Qtrue;
@@ -148,7 +148,7 @@ static VALUE walk_all_paths_with_values(Trie *trie, VALUE children, TrieState *s
 				rb_ary_push(tuple, rb_str_new2(word));
 
 				TrieData trie_data = trie_state_get_data(end_state);
-				rb_ary_push(tuple, INT2FIX(trie_data));
+				rb_ary_push(tuple, (VALUE)trie_data);
 				rb_ary_push(children, tuple);
  
 				trie_state_free(end_state);
@@ -194,7 +194,7 @@ static VALUE rb_trie_children_with_values(VALUE self, VALUE prefix) {
 		VALUE tuple = rb_ary_new();
 		rb_ary_push(tuple, prefix);
 		TrieData trie_data = trie_state_get_data(end_state);
-		rb_ary_push(tuple, INT2FIX(trie_data));
+		rb_ary_push(tuple, (VALUE)trie_data);
 		rb_ary_push(children, tuple);
 
 		trie_state_free(end_state);
@@ -297,7 +297,7 @@ static VALUE rb_trie_node_value(VALUE self) {
     TrieData trie_data = trie_state_get_data(dup);
     trie_state_free(dup);
 
-    return TRIE_DATA_ERROR == trie_data ? Qnil : INT2FIX(trie_data);
+    return TRIE_DATA_ERROR == trie_data ? Qnil : (VALUE)trie_data;
 }
 
 static VALUE rb_trie_node_terminal(VALUE self) {
@@ -318,8 +318,6 @@ static VALUE rb_trie_node_leaf(VALUE self) {
 void Init_trie() {
     cTrie = rb_define_class(&quot;Trie&quot;, rb_cObject);
     rb_define_alloc_func(cTrie, rb_trie_alloc);
-    //rb_define_method(cTrie, &quot;initialize&quot;, rb_trie_initialize, -2);
-    //rb_define_method(cTrie, &quot;path&quot;, rb_trie_get_path, 0);
     rb_define_method(cTrie, &quot;has_key?&quot;, rb_trie_has_key, 1);
     rb_define_method(cTrie, &quot;get&quot;, rb_trie_get, 1);
     rb_define_method(cTrie, &quot;add&quot;, rb_trie_add, -2);
@@ -327,7 +325,6 @@ void Init_trie() {
     rb_define_method(cTrie, &quot;children&quot;, rb_trie_children, 1);
     rb_define_method(cTrie, &quot;children_with_values&quot;, rb_trie_children_with_values, 1);
     rb_define_method(cTrie, &quot;root&quot;, rb_trie_root, 0);
-    //rb_define_method(cTrie, &quot;save&quot;, rb_trie_save, 0);
 
     cTrieNode = rb_define_class(&quot;TrieNode&quot;, rb_cObject);
     rb_define_alloc_func(cTrieNode, rb_trie_node_alloc);</diff>
      <filename>ext/trie/trie.c</filename>
    </modified>
    <modified>
      <diff>@@ -60,7 +60,7 @@ typedef int32          TrieIndex;
 /**
  * @brief Type of value associated to trie entries
  */
-typedef int32          TrieData;
+typedef unsigned long TrieData;
 /**
  * @brief Trie error data
  */</diff>
      <filename>ext/trie/triedefs.h</filename>
    </modified>
    <modified>
      <diff>@@ -49,6 +49,11 @@ describe Trie do
       @trie.add('chicka', 72_000).should == true
       @trie.get('chicka').should == 72_000
     end
+
+    it 'adds a word with a non-numeric value to the trie' do
+      @trie.add('doot', 'Heeey').should == true
+      @trie.get('doot').should == 'Heeey'
+    end
   end
 
   describe :delete do</diff>
      <filename>spec/trie_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d6f64c1f9428f5be273bf6f5f96eaa608e030ee9</id>
    </parent>
  </parents>
  <author>
    <name>Tyler McMullen</name>
    <email>tyler@scribd.com</email>
  </author>
  <url>http://github.com/tyler/trie/commit/4a999407defa92c88b443be03fd2aa8c08575bfe</url>
  <id>4a999407defa92c88b443be03fd2aa8c08575bfe</id>
  <committed-date>2009-04-17T12:27:12-07:00</committed-date>
  <authored-date>2009-04-17T12:27:12-07:00</authored-date>
  <message>Allow any ruby VALUEs as value of key, at the cost of more memory usage.</message>
  <tree>fedc9093e12778b6e732cc88ef9c40b38068bbd0</tree>
  <committer>
    <name>Tyler McMullen</name>
    <email>tyler@scribd.com</email>
  </committer>
</commit>
