glue 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
1
+ #!/usr/local/bin/ruby -w
2
+ #
3
+ # == extensions/symbol.rb
4
+ #
5
+ # Adds methods to the builtin Symbol class.
6
+ #
7
+
8
+ require "extensions/_base"
9
+
10
+
11
+ #
12
+ # * Symbol#to_proc
13
+ #
14
+ ExtensionsProject.implement(Symbol, :to_proc) do
15
+ class Symbol
16
+ #
17
+ # Allows a Symbol to be implicitly converted to a Proc.
18
+ #
19
+ # This allows such conveniences as:
20
+ # %{john terry fiona}.map(&:capitalize) # -> %{John Terry Fiona}
21
+ # sum = numbers.inject(&:+)
22
+ #
23
+ def to_proc
24
+ proc { |obj, *args| obj.send(self, *args) }
25
+ end
26
+ end
27
+ end
28
+
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.8
2
+ rubygems_version: 0.8.10
3
3
  specification_version: 1
4
4
  name: glue
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.13.0
7
- date: 2005-03-17
6
+ version: 0.14.0
7
+ date: 2005-03-28
8
8
  summary: Glue utilities
9
9
  require_paths:
10
10
  - lib
@@ -64,6 +64,29 @@ files:
64
64
  - test/glue/tc_property_mixins.rb
65
65
  - test/glue/tc_cache.rb
66
66
  - test/glue/tc_numbers.rb
67
+ - vendor/breakpoint_client.rb
68
+ - vendor/extensions
69
+ - vendor/binding_of_caller.rb
70
+ - vendor/blankslate.rb
71
+ - vendor/breakpoint.rb
72
+ - vendor/README
73
+ - vendor/extensions/enumerable.rb
74
+ - vendor/extensions/all.rb
75
+ - vendor/extensions/hash.rb
76
+ - vendor/extensions/continuation.rb
77
+ - vendor/extensions/module.rb
78
+ - vendor/extensions/binding.rb
79
+ - vendor/extensions/ostruct.rb
80
+ - vendor/extensions/kernel.rb
81
+ - vendor/extensions/class.rb
82
+ - vendor/extensions/numeric.rb
83
+ - vendor/extensions/_base.rb
84
+ - vendor/extensions/io.rb
85
+ - vendor/extensions/string.rb
86
+ - vendor/extensions/object.rb
87
+ - vendor/extensions/array.rb
88
+ - vendor/extensions/symbol.rb
89
+ - vendor/extensions/_template.rb
67
90
  test_files: []
68
91
  rdoc_options:
69
92
  - "--main"