<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/ramaze/snippets/object/__dir__.rb</filename>
    </added>
    <added>
      <filename>lib/ramaze/snippets/object/acquire.rb</filename>
    </added>
    <added>
      <filename>lib/ramaze/snippets/ramaze/struct.rb</filename>
    </added>
    <added>
      <filename>spec/ramaze/struct.rb</filename>
    </added>
    <added>
      <filename>spec/snippets/object/__dir__.rb</filename>
    </added>
    <added>
      <filename>spec/snippets/object/acquire.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -90,7 +90,7 @@ task :rcov_summary =&gt; :rcov_dir do
 end
 
 desc &quot;generate rdoc&quot;
-task :rdoc =&gt; [:clean, :readme2html] do
+task :rdoc =&gt; [:clean] do
   sh &quot;rdoc #{(RDOC_OPTS + RDOC_FILES).join(' ')}&quot;
 end
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ module Ramaze
     # The Action holds information that is essential to render the action for a
     # request.
 
-    class Action &lt; Struct.new('Action', *members)
+    class Action &lt; Ramaze::Struct.new('Action', *members)
     end
   end
 
@@ -145,7 +145,7 @@ module Ramaze
     end
   end
 
-  # Shortcut to create new instances of Action via Action::fill
+  # Shortcut to create new instances of Action
 
   def self.Action(hash = {})
     Action.create(hash)</diff>
      <filename>lib/ramaze/action.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,3 +7,16 @@ glob = File.join(dir, '**', '*.rb')
 Dir[glob].each do |snippet|
   require(snippet)
 end
+
+Ramaze::CoreExtensions.constants.each do |const|
+  ext = Ramaze::CoreExtensions.const_get(const)
+  into = Module.const_get(const)
+
+  collisions = ext.instance_methods &amp; into.instance_methods
+
+  if collisions.empty?
+    into.__send__(:include, ext)
+  else
+    warn &quot;Won't include %p with %p, %p exists&quot; % [into, ext, collisions]
+  end
+end</diff>
      <filename>lib/ramaze/snippets.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,37 +1,44 @@
 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 # All files in this distribution are subject to the terms of the Ruby license.
 
-class Array
+module Ramaze
+  module CoreExtensions
 
-  #   a = [1, 2, 3]
-  #   a.put_within(4, :after =&gt; 2, :before =&gt; 3)
-  #   a # =&gt; [1, 2, 4, 3]
+    # Extensions for Array
 
-  def put_within(object, constrain)
-    pre, post = constrain.values_at(:after, :before)
+    module Array
 
-    unless rindex(post) - index(pre) == 1
-      raise ArgumentError, &quot;Too many elements within constrain&quot;
-    end
+      #   a = [1, 2, 3]
+      #   a.put_within(4, :after =&gt; 2, :before =&gt; 3)
+      #   a # =&gt; [1, 2, 4, 3]
 
-    put_after(pre, object)
-  end
+      def put_within(object, constrain)
+        pre, post = constrain.values_at(:after, :before)
 
-  #   a = [1, 2, 3]
-  #   a.put_after(2, 4)
-  #   a # =&gt; [1, 2, 4, 3]
+        return put_after(pre, object) if rindex(post) - index(pre) == 1
 
-  def put_after(element, object)
-    raise ArgumentError, &quot;The given element doesn't exist&quot; unless include?(element)
-    self[index(element) + 1, 0] = object
-  end
+        raise ArgumentError, &quot;Too many elements within constrain&quot;
+      end
+
+      #   a = [1, 2, 3]
+      #   a.put_after(2, 4)
+      #   a # =&gt; [1, 2, 4, 3]
 
-  #   a = [1, 2, 3]
-  #   a.put_before(2, 4)
-  #   a # =&gt; [1, 4, 2, 3]
+      def put_after(element, object)
+        return self[index(element) + 1, 0] = object if include?(element)
 
-  def put_before(element, object)
-    raise ArgumentError, &quot;The given element doesn't exist&quot; unless include?(element)
-    self[rindex(element), 0] = object
+        raise ArgumentError, &quot;The given element doesn't exist&quot;
+      end
+
+      #   a = [1, 2, 3]
+      #   a.put_before(2, 4)
+      #   a # =&gt; [1, 4, 2, 3]
+
+      def put_before(element, object)
+        return self[rindex(element), 0] = object if include?(element)
+
+        raise ArgumentError, &quot;The given element doesn't exist&quot;
+      end
+    end
   end
 end</diff>
      <filename>lib/ramaze/snippets/array/put_within.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,25 @@
-class Binding
-
-  # returns a hash of localvar/localvar-values from binding, useful for
-  # template engines that do not accept bindings and force passing locals via
-  # hash
-  #   usage: x = 42; p binding.locals #=&gt; {'x'=&gt; 42}
-  def locals
-    Kernel::eval '
-      local_variables.inject({}){|h,v| k = v.to_s; h.merge!(k =&gt; eval(k)) }
-    ', self
-  end
+module Ramaze
+  module CoreExtensions
+
+    # Extensions for Binding
+
+    module Binding
 
+      # Returns a hash of localvar/localvar-values from binding, useful for
+      # template engines that do not accept bindings and force passing locals
+      # via hash
+      #
+      # Usage:
+      #   x = 42; p binding.locals #=&gt; {'x'=&gt; 42}
+
+      def locals
+        ::Kernel::eval '
+        local_variables.inject({}){|h,v|
+          k = v.to_s
+          h.merge!(k =&gt; eval(k))
+        }', self
+      end
+
+    end
+  end
 end</diff>
      <filename>lib/ramaze/snippets/binding/locals.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,26 +1,41 @@
 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 # All files in this distribution are subject to the terms of the Ruby license.
 
-# Extensions for Kernel
-
-module Kernel
-  # Original from Trans (Facets 1.4.5)
-  # This is similar to +Module#const_get+ but is accessible at all levels,
-  # and, unlike +const_get+, can handle module hierarchy.
-  #
-  #   constant(&quot;Fixnum&quot;)                  # -&gt; Fixnum
-  #   constant(:Fixnum)                   # -&gt; Fixnum
-  #
-  #   constant(&quot;Process::Sys&quot;)            # -&gt; Process::Sys
-  #   constant(&quot;Regexp::MULTILINE&quot;)       # -&gt; 4
-  #
-  #   require 'test/unit'
-  #   Test.constant(&quot;Unit::Assertions&quot;)   # -&gt; Test::Unit::Assertions
-  #   Test.constant(&quot;::Test::Unit&quot;)       # -&gt; Test::Unit
-
-  def constant(const)
-    const = const.to_s.dup
-    base = const.sub!(/^::/, '') ? Object : ( self.kind_of?(Module) ? self : self.class )
-    const.split(/::/).inject(base){ |mod, name| mod.const_get(name) }
+module Ramaze
+  module CoreExtensions
+
+    # Extensions for Kernel
+
+    module Object
+
+      # Original from Trans (Facets 1.4.5)
+      # This is similar to +Module#const_get+ but is accessible at all levels,
+      # and, unlike +const_get+, can handle module hierarchy.
+      #
+      #   constant(&quot;Fixnum&quot;)                  # -&gt; Fixnum
+      #   constant(:Fixnum)                   # -&gt; Fixnum
+      #
+      #   constant(&quot;Process::Sys&quot;)            # -&gt; Process::Sys
+      #   constant(&quot;Regexp::MULTILINE&quot;)       # -&gt; 4
+      #
+      #   require 'test/unit'
+      #   Test.constant(&quot;Unit::Assertions&quot;)   # -&gt; Test::Unit::Assertions
+      #   Test.constant(&quot;::Test::Unit&quot;)       # -&gt; Test::Unit
+
+      def constant(const)
+        const = const.to_s.dup
+
+        if const.sub!(/^::/, '')
+          base = Object
+        elsif self.kind_of?(Module)
+          base = self
+        else
+          base = self.class
+        end
+
+        const.split(/::/).inject(base){ |mod, name| mod.const_get(name) }
+      end
+    end
+
   end
 end</diff>
      <filename>lib/ramaze/snippets/kernel/constant.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,13 +3,19 @@
 
 require 'pp'
 
-# Extensions for Kernel
+module Ramaze
+  module CoreExtensions
 
-module Kernel
-  unless defined?(pretty_inspect)
-    # returns a pretty printed object as a string.
-    def pretty_inspect
-      PP.pp(self, '')
+    # Extensions for Kernel
+
+    module Kernel
+      unless defined?(pretty_inspect)
+        # returns a pretty printed object as a string.
+        def pretty_inspect
+          PP.pp(self, '')
+        end
+      end
     end
+
   end
 end</diff>
      <filename>lib/ramaze/snippets/kernel/pretty_inspect.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,25 +1,32 @@
 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 # All files in this distribution are subject to the terms of the Ruby license.
 
-class Numeric
-  FILESIZE_FORMAT = [
-    ['%.1fT', 1 &lt;&lt; 40],
-    ['%.1fG', 1 &lt;&lt; 30],
-    ['%.1fM', 1 &lt;&lt; 20],
-    ['%.1fK', 1 &lt;&lt; 10],
-  ]
+module Ramaze
+  module CoreExtensions
 
-  # Output this number as easily readable filesize.
-  # Usage:
-  #   100_000.filesize_format             # =&gt; &quot;97.7K&quot;
-  #   100_000_000.filesize_format         # =&gt; &quot;95.4M&quot;
-  #   100_000_000_000.filesize_format     # =&gt; &quot;93.1G&quot;
-  #   100_000_000_000_000.filesize_format # =&gt; &quot;90.9T&quot;
-  def filesize_format
-    FILESIZE_FORMAT.each do |format, size|
-      return format % (self.to_f / size) if self &gt;= size
+    # Extensions for Numeric
+    module Numeric
+      FILESIZE_FORMAT = [
+        ['%.1fT', 1 &lt;&lt; 40],
+        ['%.1fG', 1 &lt;&lt; 30],
+        ['%.1fM', 1 &lt;&lt; 20],
+        ['%.1fK', 1 &lt;&lt; 10],
+      ]
+
+      # Output this number as easily readable filesize.
+      # Usage:
+      #   100_000.filesize_format             # =&gt; &quot;97.7K&quot;
+      #   100_000_000.filesize_format         # =&gt; &quot;95.4M&quot;
+      #   100_000_000_000.filesize_format     # =&gt; &quot;93.1G&quot;
+      #   100_000_000_000_000.filesize_format # =&gt; &quot;90.9T&quot;
+      def filesize_format
+        FILESIZE_FORMAT.each do |format, size|
+          return format % (self.to_f / size) if self &gt;= size
+        end
+
+        self.to_s
+      end
     end
 
-    self.to_s
   end
 end</diff>
      <filename>lib/ramaze/snippets/numeric/filesize_format.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,56 +1,63 @@
-class Numeric
-
-  def seconds
-    self
-  end
-  alias second seconds
-
-  # 60 seconds in a minute
-  def minutes
-    self * 60
-  end
-  alias minute minutes
-
-  # 60 minutes in an hour
-  def hours
-    self * 3600
-  end
-  alias hour hours
-
-  # 24 hours in a day
-  def days
-    self * 86400
-  end
-  alias day days
-
-  # 7 days in a week
-  def weeks
-    self * 604800
-  end
-  alias week weeks
-
-  # 30 days in a month
-  def months
-    self * 2592000
-  end
-  alias month months
-
-  # 365.25 days in a year
-  def years
-    self * 883612800
-  end
-  alias year years
-
-  # Time in the past, i.e. 3.days.ago
-  def ago t = Time.now
-    t - self
-  end
-  alias before ago
-
-  # Time in the future, i.e. 3.days.from_now
-  def from_now t = Time.now
-    t + self
-  end
-  alias since from_now
-
-end unless 5.respond_to? :days
+module Ramaze
+  module CoreExtensions
+
+    # Extensions for Numeric
+
+    module Numeric
+      def seconds
+        self
+      end
+      alias second seconds
+
+      # 60 seconds in a minute
+      def minutes
+        self * 60
+      end
+      alias minute minutes
+
+      # 60 minutes in an hour
+      def hours
+        self * 3600
+      end
+      alias hour hours
+
+      # 24 hours in a day
+      def days
+        self * 86400
+      end
+      alias day days
+
+      # 7 days in a week
+      def weeks
+        self * 604800
+      end
+      alias week weeks
+
+      # 30 days in a month
+      def months
+        self * 2592000
+      end
+      alias month months
+
+      # 365.25 days in a year
+      def years
+        self * 883612800
+      end
+      alias year years
+
+      # Time in the past, i.e. 3.days.ago
+      def ago t = Time.now
+        t - self
+      end
+      alias before ago
+
+      # Time in the future, i.e. 3.days.from_now
+      def from_now t = Time.now
+        t + self
+      end
+      alias since from_now
+
+    end
+
+  end
+end</diff>
      <filename>lib/ramaze/snippets/numeric/time.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,19 @@
-class Object
-  # Available in 1.8.6 and later.
-  unless method_defined?(:instance_variable_defined?)
-    def instance_variable_defined?(variable)
-      instance_variables.include?(variable.to_s)
+#          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
+# All files in this distribution are subject to the terms of the Ruby license.
+
+module Ramaze
+  module CoreExtensions
+
+    # Extensions for Object
+    module Object
+      # Available in 1.8.6 and later.
+
+      unless ::Object.method_defined?(:instance_variable_defined?)
+        def instance_variable_defined?(variable)
+          instance_variables.include?(variable.to_s)
+        end
+      end
     end
+
   end
 end</diff>
      <filename>lib/ramaze/snippets/object/instance_variable_defined.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,16 @@
-class Object
-  def pretty s = ''
-    PP.pp(self, s)
-    s
+module Ramaze
+  module CoreExtensions
+
+    # Extensions for Object
+    module Object
+
+      # Returns the string that #pretty_inspect would yield
+
+      def pretty s = ''
+        PP.pp(self, s)
+        s
+      end
+    end
+
   end
 end</diff>
      <filename>lib/ramaze/snippets/object/pretty.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,18 @@
-class Object
+module Ramaze
+  module CoreExtensions
 
-  # returns a new clean binding for this object
-  #   usage: eval 'self', object.scope  #=&gt; returns object
-  #
+    # Extensions for Object
+    module Object
 
-  def scope
-    lambda{}
-  end
+      # returns a new clean binding for this object
+      #   usage: eval 'self', object.scope  #=&gt; returns object
+      #
+
+      def scope
+        lambda{}
+      end
 
+    end
+
+  end
 end</diff>
      <filename>lib/ramaze/snippets/object/scope.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,19 @@
-class Proc
-
-  # returns a hash of localvar/localvar-values from proc, useful for template
-  # engines that do not accept bindings/proc and force passing locals via
-  # hash
-  #   usage: x = 42; p Proc.new.locals #=&gt; {'x'=&gt; 42}
-  def locals
-    instance_eval('binding').locals
-  end
+module Ramaze
+  module CoreExtensions
+
+    # Extensions for Proc
+
+    module Proc
 
+      # returns a hash of localvar/localvar-values from proc, useful for template
+      # engines that do not accept bindings/proc and force passing locals via
+      # hash
+      #   usage: x = 42; p Proc.new.locals #=&gt; {'x'=&gt; 42}
+
+      def locals
+        instance_eval('binding').locals
+      end
+
+    end
+  end
 end</diff>
      <filename>lib/ramaze/snippets/proc/locals.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,21 @@
 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 # All files in this distribution are subject to the terms of the Ruby license.
 
-# Extensions for String
+module Ramaze
+  module CoreExtensions
 
-class String
+    # Extensions for String
 
-  # simple transformation to CamelCase from snake_case
-  #
-  #   'foo_bar'.camel_case # =&gt; 'FooBar'
+    module String
+
+      # simple transformation to CamelCase from snake_case
+      #
+      #   'foo_bar'.camel_case # =&gt; 'FooBar'
+
+      def camel_case
+        split('_').map{|e| e.capitalize}.join
+      end
+    end
 
-  def camel_case
-    split('_').map{|e| e.capitalize}.join
   end
 end
-</diff>
      <filename>lib/ramaze/snippets/string/camel_case.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,27 +1,31 @@
 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 # All files in this distribution are subject to the terms of the Ruby license.
 
-# Extensions for String
+module Ramaze
+  module CoreExtensions
+    # Extensions for String
 
-class String
-  { :reset          =&gt;  0,
-    :bold           =&gt;  1,
-    :dark           =&gt;  2,
-    :underline      =&gt;  4,
-    :blink          =&gt;  5,
-    :negative       =&gt;  7,
-    :black          =&gt; 30,
-    :red            =&gt; 31,
-    :green          =&gt; 32,
-    :yellow         =&gt; 33,
-    :blue           =&gt; 34,
-    :magenta        =&gt; 35,
-    :cyan           =&gt; 36,
-    :white          =&gt; 37,
-  }.each do |key, value|
-    define_method key do
-      &quot;\e[#{value}m&quot; + self + &quot;\e[0m&quot;
+    module String
+      { :reset          =&gt;  0,
+        :bold           =&gt;  1,
+        :dark           =&gt;  2,
+        :underline      =&gt;  4,
+        :blink          =&gt;  5,
+        :negative       =&gt;  7,
+        :black          =&gt; 30,
+        :red            =&gt; 31,
+        :green          =&gt; 32,
+        :yellow         =&gt; 33,
+        :blue           =&gt; 34,
+        :magenta        =&gt; 35,
+        :cyan           =&gt; 36,
+        :white          =&gt; 37,
+      }.each do |key, value|
+        define_method key do
+          &quot;\e[#{value}m&quot; + self + &quot;\e[0m&quot;
+        end
+      end
     end
+
   end
 end
-</diff>
      <filename>lib/ramaze/snippets/string/color.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,19 @@
 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 # All files in this distribution are subject to the terms of the Ruby license.
 
-# Extensions for String
+module Ramaze
+  module CoreExtensions
 
-class String
-  alias each each_line unless ''.respond_to?(:each)
+    # Extensions for String
+
+    module String
+      # 1.9 Compatibility with 1.8
+
+      unless ''.respond_to?(:each)
+        def each(*args, &amp;block)
+          each_line(*args, &amp;block)
+        end
+      end
+    end
+  end
 end</diff>
      <filename>lib/ramaze/snippets/string/each.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,20 @@
-class String
-  unless method_defined?(:end_with?)
-    # Compatibility with 1.9
-    def end_with?(other)
-      other = other.to_s
-      self[-other.size, other.size] == other
+#          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
+# All files in this distribution are subject to the terms of the Ruby license.
+
+module Ramaze
+  module CoreExtensions
+
+    # Extensions for String
+
+    module String
+      unless ''.respond_to?(:end_with?)
+        # Compatibility with 1.9
+        def end_with?(other)
+          other = other.to_s
+          self[-other.size, other.size] == other
+        end
+      end
     end
+
   end
 end</diff>
      <filename>lib/ramaze/snippets/string/end_with.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,26 +1,34 @@
 require 'cgi'
 require 'uri'
 
-class String
+module Ramaze
+  module CoreExtensions
 
-  # String#escape is an extensible escaping mechanism for string.  currently
-  # it suports
-  #   '&lt;div&gt;foo bar&lt;/div&gt;'.esc(:html)
-  #   'foo bar'.esc(:uri)
-  #   'foo bar'.esc(:cgi)
+    # Extensions for String
 
-  def escape which = :html
-    case which
-    when :html
-      Rack::Utils.escape_html(self)
-    when :cgi
-      Rack::Utils.escape(self)
-    when :uri
-      ::URI.escape(self)
-    else
-      raise ArgumentError, &quot;do not know how to escape '#{ which }'&quot;
+    module String
+
+      # String#escape is an extensible escaping mechanism for string.  currently
+      # it suports
+      #   '&lt;div&gt;foo bar&lt;/div&gt;'.esc(:html)
+      #   'foo bar'.esc(:uri)
+      #   'foo bar'.esc(:cgi)
+
+      def escape which = :html
+        case which
+        when :html
+          Rack::Utils.escape_html(self)
+        when :cgi
+          Rack::Utils.escape(self)
+        when :uri
+          ::URI.escape(self)
+        else
+          raise ArgumentError, &quot;do not know how to escape '#{ which }'&quot;
+        end
+      end
+
+      alias_method 'esc', 'escape'
     end
-  end
 
-  alias_method 'esc', 'escape'
+  end
 end</diff>
      <filename>lib/ramaze/snippets/string/esc.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,21 @@
 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 # All files in this distribution are subject to the terms of the Ruby license.
 
-# Extensions for String
+module Ramaze
+  module CoreExtensions
 
-class String
-  unless method_defined?(:ord)
+    # Extensions for String
 
-    # compatibility with Ruby 1.9
+    module String
+      unless ''.respond_to?(:ord)
 
-    def ord
-      self[0]
+        # compatibility with Ruby 1.9
+
+        def ord
+          self[0]
+        end
+      end
     end
+
   end
 end</diff>
      <filename>lib/ramaze/snippets/string/ord.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,21 @@
 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 # All files in this distribution are subject to the terms of the Ruby license.
 
-# Extensions for String
+module Ramaze
+  module CoreExtensions
 
-class String
+    # Extensions for String
 
-  # convert to snake_case from CamelCase
-  #
-  #   'FooBar'.snake_case # =&gt; 'foo_bar'
+    module String
+
+      # convert to snake_case from CamelCase
+      #
+      #   'FooBar'.snake_case # =&gt; 'foo_bar'
+
+      def snake_case
+        gsub(/\B[A-Z][^A-Z]/, '_\&amp;').downcase.gsub(' ', '_')
+      end
+    end
 
-  def snake_case
-    gsub(/\B[A-Z][^A-Z]/, '_\&amp;').downcase.gsub(' ', '_')
   end
 end</diff>
      <filename>lib/ramaze/snippets/string/snake_case.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,19 @@
-class String
-  unless method_defined?(:start_with?)
-    # Compatibility with 1.9
-    def start_with?(other)
-      other = other.to_s
-      self[0, other.size] == other
+module Ramaze
+  module CoreExtensions
+
+    # Extensions for String
+
+    module String
+
+      unless ''.respond_to?(:start_with?)
+
+        # Compatibility with 1.9
+
+        def start_with?(other)
+          other = other.to_s
+          self[0, other.size] == other
+        end
+      end
     end
   end
 end</diff>
      <filename>lib/ramaze/snippets/string/start_with.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,20 +1,28 @@
-class String
-  # Useful for writing indented String and unindent on demand, based on the
-  # first line with indentation.
-  def unindent
-    find_indent = proc{ |l| l.find{|l| !l.strip.empty?}.to_s[/^(\s+)/, 1] }
+module Ramaze
+  module CoreExtensions
 
-    lines = self.split(&quot;\n&quot;)
-    space = find_indent[lines]
-    space = find_indent[lines.reverse] unless space
+    # Extensions for String
 
-    strip.gsub(/^#{space}/, '')
-  end
-  alias ui unindent
+    module String
+
+      # Useful for writing indented String and unindent on demand, based on the
+      # first line with indentation.
+      def unindent
+        find_indent = proc{ |l| l.find{|l| !l.strip.empty?}.to_s[/^(\s+)/, 1] }
+
+        lines = self.split(&quot;\n&quot;)
+        space = find_indent[lines]
+        space = find_indent[lines.reverse] unless space
+
+        strip.gsub(/^#{space}/, '')
+      end
+      alias ui unindent
 
-  # Destructive variant of undindent, replacing the String
-  def unindent!
-    self.replace unindent
+      # Destructive variant of undindent, replacing the String
+      def unindent!
+        self.replace unindent
+      end
+      alias ui! unindent!
+    end
   end
-  alias ui! unindent!
 end</diff>
      <filename>lib/ramaze/snippets/string/unindent.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,24 +1,30 @@
 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 # All files in this distribution are subject to the terms of the Ruby license.
 
-# Extensions for Symbol
+module Ramaze
+  module CoreExtensions
 
-class Symbol
-  unless method_defined?(:to_proc)
+    # Extensions for Symbol
 
-    # Turns the symbol into a simple proc, which is especially useful for enumerations. Examples:
-    #
-    #   # The same as people.collect { |p| p.name }
-    #   people.collect(&amp;:name)
-    #
-    #   # The same as people.select { |p| p.manager? }.collect { |p| p.salary }
-    #   people.select(&amp;:manager?).collect(&amp;:salary)
-    #
-    #   [1, 2, 3].map(&amp;:to_s)    # =&gt; ['1', '2', '3']
-    #   %w[a b c].map(&amp;:to_sym)  # =&gt; [:a, :b, :c]
+    module Symbol
+      unless :to_proc.respond_to?(:to_proc)
 
-    def to_proc
-      Proc.new{|*args| args.shift.__send__(self, *args) }
+        # Turns the symbol into a simple proc, which is especially useful for enumerations. Examples:
+        #
+        #   # The same as people.collect { |p| p.name }
+        #   people.collect(&amp;:name)
+        #
+        #   # The same as people.select { |p| p.manager? }.collect { |p| p.salary }
+        #   people.select(&amp;:manager?).collect(&amp;:salary)
+        #
+        #   [1, 2, 3].map(&amp;:to_s)    # =&gt; ['1', '2', '3']
+        #   %w[a b c].map(&amp;:to_sym)  # =&gt; [:a, :b, :c]
+
+        def to_proc
+          Proc.new{|*args| args.shift.__send__(self, *args) }
+        end
+      end
     end
+
   end
 end</diff>
      <filename>lib/ramaze/snippets/symbol/to_proc.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,10 @@
 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 # All files in this distribution are subject to the terms of the Ruby license.
 
+# Extensions for Thread
+
 class Thread
-  # Copy following:
-  #   :action, :response, :request, :session,
-  #   :task, :adapter, :controller, :exception
+  # Copy all thread variables into the new thread
 
   def self.into *args
     Thread.new(Thread.current, *args) do |thread, *args|</diff>
      <filename>lib/ramaze/snippets/thread/into.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,14 @@
 if caller
   snippet = caller.grep(%r!spec/snippets/!).first.split(':').first
   require File.expand_path(snippet).gsub('/spec/', '/lib/ramaze/')
+
+  if defined?(Ramaze::CoreExtensions)
+    Ramaze::CoreExtensions.constants.each do |const|
+      ext = Ramaze::CoreExtensions.const_get(const)
+      into = Module.const_get(const)
+      into.__send__(:include, ext)
+    end
+  end
 end
 
 require 'lib/ramaze/spec/helper/bacon'</diff>
      <filename>lib/ramaze/spec/helper/snippets.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,8 +4,7 @@
 require 'rake'
 require 'pp'
 
-require 'lib/ramaze/snippets/divide'
-require 'lib/ramaze/snippets/string/color'
+require 'lib/ramaze/snippets'
 
 desc 'Run all specs'
 task 'spec' do</diff>
      <filename>rake_tasks/spec.rake</filename>
    </modified>
    <modified>
      <diff>@@ -21,5 +21,3 @@ describe 'Template Haml' do
     end
   end
 end
-
-</diff>
      <filename>spec/examples/templates/template_haml.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/ramaze/snippets/kernel/__dir__.rb</filename>
    </removed>
    <removed>
      <filename>lib/ramaze/snippets/kernel/acquire.rb</filename>
    </removed>
    <removed>
      <filename>lib/ramaze/snippets/struct/fill.rb</filename>
    </removed>
    <removed>
      <filename>lib/ramaze/snippets/struct/values_at.rb</filename>
    </removed>
    <removed>
      <filename>spec/snippets/kernel/__dir__.rb</filename>
    </removed>
    <removed>
      <filename>spec/snippets/kernel/acquire.rb</filename>
    </removed>
    <removed>
      <filename>spec/snippets/struct/fill.rb</filename>
    </removed>
    <removed>
      <filename>spec/snippets/struct/values_at.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>758142cc19356063e58a36175d97803387404657</id>
    </parent>
  </parents>
  <author>
    <name>Michael Fellinger</name>
    <email>m.fellinger@gmail.com</email>
  </author>
  <url>http://github.com/manveru/ramaze/commit/acc76de754a70ae3c12c0c77330d9dfec3711234</url>
  <id>acc76de754a70ae3c12c0c77330d9dfec3711234</id>
  <committed-date>2008-08-25T08:48:06-07:00</committed-date>
  <authored-date>2008-08-16T08:05:14-07:00</authored-date>
  <message>Move extensions to ruby core into own module

   * Moved into Ramaze::CoreExtensions
   * Included into appropriate class on startup
   * Remove unused or broken snippets
   * Warn and don't extend on collision of method names
   * Move Kernel snippets that belong into Object into the correct place</message>
  <tree>4bb3a25acdfaaec5fa61b210fe985d7eadbd5896</tree>
  <committer>
    <name>Michael Fellinger</name>
    <email>m.fellinger@gmail.com</email>
  </committer>
</commit>
