<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/clamav-testfiles/jquery.tooltip.pack.js</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -6,6 +6,7 @@ static VALUE cClamAV;
 struct ClamAV_R {
     struct cl_engine *root;
     int options;
+    int db_options;
     struct cl_stat dbstat;
     unsigned int signo;
 };
@@ -26,10 +27,15 @@ static VALUE clamavr_new(argc, argv, klass)
 {
     const char *v_fname;
     int v_options;
-    rb_scan_args(argc, argv, &quot;01&quot;, &amp;v_options);
+    int v_db_options;
+    rb_scan_args(argc, argv, &quot;02&quot;, &amp;v_options, &amp;v_db_options);
     if(NIL_P(v_options)){
       v_options = INT2FIX(CL_SCAN_STDOPT); /* default value */
     }
+    if(NIL_P(v_db_options)){
+      v_db_options = INT2FIX(CL_DB_STDOPT); /* default value */
+    }
+
     int ret;
     ret = cl_init(FIX2INT(v_options));
     if(ret != CL_SUCCESS) {
@@ -43,13 +49,14 @@ static VALUE clamavr_new(argc, argv, klass)
 
     /* save options */
     ptr-&gt;options = v_options;
+    ptr-&gt;db_options = v_db_options;
 
     ptr-&gt;signo = 0;
 
     const char *dbdir;
     dbdir = cl_retdbdir();
 
-    ret = cl_load(dbdir, ptr-&gt;root, &amp;ptr-&gt;signo, CL_DB_STDOPT);
+    ret = cl_load(dbdir, ptr-&gt;root, &amp;ptr-&gt;signo, FIX2INT(v_db_options));
     if(ret != CL_SUCCESS) {
         rb_raise(rb_eRuntimeError, &quot;cl_load() error: %s\n&quot;, cl_strerror(ret));
     }
@@ -174,7 +181,7 @@ static VALUE clamavr_dbreload(VALUE self) {
         const char *dbdir;
         dbdir = cl_retdbdir();
         int ret;
-        ret = cl_load(dbdir, ptr-&gt;root, &amp;ptr-&gt;signo, CL_DB_STDOPT);
+        ret = cl_load(dbdir, ptr-&gt;root, &amp;ptr-&gt;signo, FIX2INT(ptr-&gt;db_options));
         if(ret != CL_SUCCESS) {
             rb_raise(rb_eRuntimeError, &quot;cl_load() error: %s\n&quot;, cl_strerror(ret));
         }</diff>
      <filename>ext/clamav/clamav.c</filename>
    </modified>
    <modified>
      <diff>@@ -72,6 +72,20 @@ class ClamAV
 
     end
 
+    describe &quot;with custom db options&quot; do
+
+      before(:all) do
+        @clam = ClamAV.new(CL_SCAN_STDOPT, CL_DB_STDOPT | CL_DB_PUA)
+      end
+
+      it &quot;should detect PUA&quot; do
+        @clam.scanfile(File.join(File.dirname(__FILE__), &quot;../clamav-testfiles/&quot;,
+          'jquery.tooltip.pack.js')).should == 'PUA.Script.Packed-2'
+      end
+
+    end
+
+
     describe &quot;limits&quot; do
       before(:each) do
         @clam = ClamAV.new</diff>
      <filename>spec/unit/clamav_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>80b98de3d538801849e19c0b4d6f3ae07ff5a489</id>
    </parent>
  </parents>
  <author>
    <name>Alex Eagle</name>
    <email>eagle.alex@gmail.com</email>
  </author>
  <url>http://github.com/eagleas/clamav/commit/26f973775e5e8c0ae42b67c45c16ed2a166f6a96</url>
  <id>26f973775e5e8c0ae42b67c45c16ed2a166f6a96</id>
  <committed-date>2009-04-07T08:06:55-07:00</committed-date>
  <authored-date>2009-04-07T08:06:55-07:00</authored-date>
  <message>Add optional db_options to new()</message>
  <tree>69ae389fc506d8596d9fb5785174b1632261fcf6</tree>
  <committer>
    <name>Alex Eagle</name>
    <email>eagle.alex@gmail.com</email>
  </committer>
</commit>
