aboutsummaryrefslogtreecommitdiff
path: root/lib/core_ext
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-28 14:08:39 -0800
committerelijah <elijah@riseup.net>2012-11-28 14:08:39 -0800
commite2c31618b6f70d86c55c348436dd600b2e4ace21 (patch)
tree2bf27e98fc62af402499c0e7736b02b280dfc320 /lib/core_ext
parent16f9ee1668a06d6b83dfc312d0601d4f235ab8ef (diff)
downloadleap_cli-e2c31618b6f70d86c55c348436dd600b2e4ace21.tar.gz
leap_cli-e2c31618b6f70d86c55c348436dd600b2e4ace21.tar.bz2
command name shuffle -- grouped more commands together as subcommands
Diffstat (limited to 'lib/core_ext')
-rw-r--r--lib/core_ext/string.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/core_ext/string.rb b/lib/core_ext/string.rb
new file mode 100644
index 0000000..07af8e5
--- /dev/null
+++ b/lib/core_ext/string.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