diff options
author | elijah <elijah@riseup.net> | 2014-11-24 22:45:27 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-11-24 22:45:27 -0800 |
commit | b839376a507e37a048ea2df53127ed0884310f60 (patch) | |
tree | 68ba30a77c51a3ee1a2c9ddd7187e6743cff08f1 /lib/leap_cli/core_ext/string.rb | |
parent | 8450768268c2bdf82cd6d6bfa9972c70bc5cdcac (diff) |
moved core_ext and lib_ext under leap_cli
Diffstat (limited to 'lib/leap_cli/core_ext/string.rb')
-rw-r--r-- | lib/leap_cli/core_ext/string.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/leap_cli/core_ext/string.rb b/lib/leap_cli/core_ext/string.rb new file mode 100644 index 0000000..07af8e5 --- /dev/null +++ b/lib/leap_cli/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 |