summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/core_extensions.rb14
-rw-r--r--lib/static_page.rb3
2 files changed, 16 insertions, 1 deletions
diff --git a/lib/core_extensions.rb b/lib/core_extensions.rb
new file mode 100644
index 0000000..07af8e5
--- /dev/null
+++ b/lib/core_extensions.rb
@@ -0,0 +1,14 @@
+#
+# make ruby 1.9 act more like ruby 1.8
+#
+unless String.method_defined?(:to_a)
+ class String
+ def to_a; [self]; end
+ end
+end
+
+unless String.method_defined?(:any?)
+ class String
+ def any?; self.chars.any?; end
+ end
+end
diff --git a/lib/static_page.rb b/lib/static_page.rb
index 65e9c72..679e799 100644
--- a/lib/static_page.rb
+++ b/lib/static_page.rb
@@ -1,4 +1,4 @@
-require 'lib/property_set'
+require 'property_set'
require 'i18n'
require 'pathname'
@@ -30,6 +30,7 @@ class StaticPage
array.delete_if do |page|
page.props.locale(locale).send(attr).nil?
end
+ return PageArray.new.replace array
end
end