<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/decision_3_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -171,6 +171,11 @@ module Decision
   #
   #   will yield { result =&gt; [ 'normal', 'large' ]} for f0 =&gt; 56
   #
+  # * &quot;unbounded&quot;, by default, string matching is 'bounded', &quot;apple&quot; will match
+  #   'apple', but not 'greenapple'. When &quot;unbounded&quot; is set, 'greenapple' will
+  #   match. ('bounded', in reality, means the target value is surrounded
+  #   by ^ and $)
+  #
   # === Setting options at table initialization
   #
   # It's OK to set the options at initialization time :
@@ -250,6 +255,17 @@ module Decision
     #
     attr_accessor :accumulate
 
+    # when set to true, evaluation of ruby code for output is allowed. False
+    # by default.
+    #
+    attr_accessor :ruby_eval
+
+    # false (bounded) by default : exact matches for string matching. When
+    # 'unbounded', target 'apple' will match for values like 'greenapples' or
+    # 'apple seed'.
+    #
+    attr_accessor :unbound
+
     # The constructor for DecisionTable, you can pass a String, an Array
     # (of arrays), a File object. The CSV parser coming with Ruby will take
     # care of it and a DecisionTable instance will be built.
@@ -282,6 +298,7 @@ module Decision
       set_opt(options, :ignore_case, :ignorecase)
       set_opt(options, :accumulate)
       set_opt(options, :ruby_eval)
+      set_opt(options, :unbounded)
 
       @first_match = false if @accumulate
     end
@@ -371,8 +388,8 @@ module Decision
       modifiers = 0
       modifiers += Regexp::IGNORECASE if @ignore_case
 
-      #rcell = Regexp.new(cell, modifiers)
-      rcell = Regexp.new(&quot;^#{cell}$&quot;, modifiers)
+      rcell = @unbounded ?
+        Regexp.new(cell, modifiers) : Regexp.new(&quot;^#{cell}$&quot;, modifiers)
 
       rcell.match(value)
     end
@@ -449,6 +466,8 @@ module Decision
         elsif cell == 'accumulate'
           @first_match = false
           @accumulate = true
+        elsif cell == 'unbounded'
+          @unbounded = true
         end
       end
 </diff>
      <filename>lib/rufus/decision.rb</filename>
    </modified>
    <modified>
      <diff>@@ -397,20 +397,5 @@ in:fx,out:fz
     wi = { &quot;fx&quot; =&gt; &quot;81&quot; }
     do_test CSV13, wi, { &quot;fz&quot; =&gt; &quot;bad&quot; }, false
   end
-
-  CSV14 = %{
-in:fstate,out:result
-apple,1
-orange,2
-}
-
-  def test_bounded_match
-
-    dt = Rufus::DecisionTable.new(CSV14)
-
-    assert_equal(
-      { 'fstate' =&gt; 'greenapples' },
-      dt.transform({ 'fstate' =&gt; 'greenapples' }))
-  end
 end
 </diff>
      <filename>test/decision_0_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2c70c64e5d00053ad21061c657739051334a6f8a</id>
    </parent>
  </parents>
  <author>
    <name>John Mettraux</name>
    <email>jmettraux@gmail.com</email>
  </author>
  <url>http://github.com/jmettraux/rufus-decision/commit/39198fb6ab8b8d647e79e3bd4ac9f70e370bbf6f</url>
  <id>39198fb6ab8b8d647e79e3bd4ac9f70e370bbf6f</id>
  <committed-date>2009-09-06T21:54:57-07:00</committed-date>
  <authored-date>2009-09-06T21:54:57-07:00</authored-date>
  <message>added 'unbounded' option</message>
  <tree>38a0293ac45507f37be9b6109c05d655b50606b5</tree>
  <committer>
    <name>John Mettraux</name>
    <email>jmettraux@gmail.com</email>
  </committer>
</commit>
