Ruby 1.9.1 bugfixes

Signed-off-by: Tobias Lütke <[email protected]>
This commit is contained in:
Jakub Kuźma
2009-04-17 06:33:20 +08:00
committed by Tobias Lütke
parent 56f1aa9b4a
commit daadb1a2d6
4 changed files with 30 additions and 31 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
* Ruby 1.9.1 bugfixes
* Fix LiquidView for Rails 2.2. Fix local assigns for all versions of Rails * Fix LiquidView for Rails 2.2. Fix local assigns for all versions of Rails
* Fixed gem install rake task * Fixed gem install rake task
@@ -25,7 +27,7 @@
* Improved filter parameters. Filter parameters are now context sensitive; Types are resolved according to the rules of the context. Multiple parameters are now separated by the Liquid::ArgumentSeparator: , by default [Paul Hammond] * Improved filter parameters. Filter parameters are now context sensitive; Types are resolved according to the rules of the context. Multiple parameters are now separated by the Liquid::ArgumentSeparator: , by default [Paul Hammond]
{{ 'Typo' | link_to: 'http://typo.leetsoft.com', 'Typo - a modern weblog engine' }} {{ 'Typo' | link_to: 'http://typo.leetsoft.com', 'Typo - a modern weblog engine' }}
* Added Liquid::Drop. A base class which you can use for exporting proxy objects to liquid which can acquire more data when used in liquid. [Tobias Luetke] * Added Liquid::Drop. A base class which you can use for exporting proxy objects to liquid which can acquire more data when used in liquid. [Tobias Luetke]
+1 -2
View File
@@ -2,7 +2,6 @@ require 'set'
module Liquid module Liquid
parent_object = if defined? BlankObject parent_object = if defined? BlankObject
BlankObject BlankObject
else else
@@ -15,7 +14,7 @@ module Liquid
# One of the strainer's responsibilities is to keep malicious method calls out # One of the strainer's responsibilities is to keep malicious method calls out
class Strainer < parent_object #:nodoc: class Strainer < parent_object #:nodoc:
INTERNAL_METHOD = /^__/ INTERNAL_METHOD = /^__/
@@required_methods = Set.new([:__send__, :__id__, :respond_to?, :extend, :methods, :class]) @@required_methods = Set.new([:__send__, :respond_to?, :extend, :methods, :class, :object_id])
@@filters = {} @@filters = {}
+1 -3
View File
@@ -34,8 +34,7 @@ module Liquid
def render(context) def render(context)
return '' if @name.nil? return '' if @name.nil?
output = context[@name] @filters.inject(context[@name]) do |output, filter|
@filters.inject(output) do |output, filter|
filterargs = filter[1].to_a.collect do |a| filterargs = filter[1].to_a.collect do |a|
context[a] context[a]
end end
@@ -45,7 +44,6 @@ module Liquid
raise FilterNotFound, "Error - filter '#{filter[0]}' in '#{@markup.strip}' could not be found." raise FilterNotFound, "Error - filter '#{filter[0]}' in '#{@markup.strip}' could not be found."
end end
end end
output
end end
end end
end end
+2 -2
View File
@@ -1,10 +1,10 @@
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = %q{liquid} s.name = %q{liquid}
s.version = "1.9.0" s.version = "2.0.1"
s.specification_version = 2 if s.respond_to? :specification_version= s.specification_version = 2 if s.respond_to? :specification_version=
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Tobias Luetke"] s.authors = ["Tobias Luetke"]
s.date = %q{2008-06-23} s.date = %q{2009-04-13}
s.description = %q{A secure non evaling end user template engine with aesthetic markup.} s.description = %q{A secure non evaling end user template engine with aesthetic markup.}
s.email = %q{[email protected]} s.email = %q{[email protected]}
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"] s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]