extensions 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
1
+
2
+ require 'test/unit'
3
+ require 'extensions/symbol'
4
+
5
+ class TC_Symbol < Test::Unit::TestCase
6
+ def test_to_proc
7
+ x = (1..10).inject(&:*)
8
+ assert_equal(3628800, x)
9
+
10
+ x = %w{foo bar qux}.map(&:reverse)
11
+ assert_equal(%w{oof rab xuq}, x)
12
+
13
+ x = [1, 2, nil, 3, nil].reject(&:nil?)
14
+ assert_equal([1, 2, 3], x)
15
+
16
+ x = %w{ruby and world}.sort_by(&:reverse)
17
+ assert_equal(%w{world and ruby}, x)
18
+ end
19
+ end # class TC_Symbol
20
+
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.1
3
+ specification_version: 1
4
+ name: extensions
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.4.0
7
+ date: 2004-09-23
8
+ summary: "'extensions' is a set of extensions to Ruby's built-in classes. It gathers
9
+ common idioms, useful additions, and aliases, complete with unit testing and
10
+ documentation, so they are suitable for production code."
11
+ require_paths:
12
+ - lib
13
+ author: Gavin Sinclair
14
+ email: gsinclair@soyabean.com.au
15
+ homepage: http://extensions.rubyforge.org
16
+ rubyforge_project: extensions
17
+ description: "'extensions' is a set of extensions to Ruby's built-in classes. It gathers
18
+ common idioms, useful additions, and aliases, complete with unit testing and
19
+ documentation, so they are suitable for production code. See
20
+ http://extensions.rubyforge.org for full documentation."
21
+ autorequire:
22
+ default_executable: rbxtm
23
+ bindir: bin
24
+ has_rdoc: "true"
25
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
26
+ requirements:
27
+ -
28
+ - ">"
29
+ - !ruby/object:Gem::Version
30
+ version: 0.0.0
31
+ version:
32
+ platform: ruby
33
+ files:
34
+ - ChangeLog
35
+ - HISTORY
36
+ - Rakefile
37
+ - README
38
+ - README.1st
39
+ - VERSION
40
+ - install-doc.rb
41
+ - install.rb
42
+ - install.sh
43
+ - bin/rbxtm
44
+ - lib/extensions
45
+ - lib/extensions/all.rb
46
+ - lib/extensions/array.rb
47
+ - lib/extensions/class.rb
48
+ - lib/extensions/enumerable.rb
49
+ - lib/extensions/hash.rb
50
+ - lib/extensions/io.rb
51
+ - lib/extensions/numeric.rb
52
+ - lib/extensions/object.rb
53
+ - lib/extensions/ostruct.rb
54
+ - lib/extensions/string.rb
55
+ - lib/extensions/symbol.rb
56
+ - lib/extensions/_base.rb
57
+ - lib/extensions/_template.rb
58
+ - "./test/tc_array.rb"
59
+ - "./test/tc_class.rb"
60
+ - "./test/tc_enumerable.rb"
61
+ - "./test/tc_hash.rb"
62
+ - "./test/tc_io.rb"
63
+ - "./test/tc_numeric.rb"
64
+ - "./test/tc_object.rb"
65
+ - "./test/tc_ostruct.rb"
66
+ - "./test/tc_string.rb"
67
+ - "./test/tc_symbol.rb"
68
+ - "./test/TEST.rb"
69
+ - etc/checklist
70
+ - etc/doctools
71
+ - etc/release
72
+ - etc/website
73
+ - etc/website/index.html
74
+ - etc/website/upload.sh
75
+ test_files:
76
+ - test/tc_array.rb
77
+ - test/tc_class.rb
78
+ - test/tc_enumerable.rb
79
+ - test/tc_hash.rb
80
+ - test/tc_io.rb
81
+ - test/tc_numeric.rb
82
+ - test/tc_object.rb
83
+ - test/tc_ostruct.rb
84
+ - test/tc_string.rb
85
+ - test/tc_symbol.rb
86
+ rdoc_options:
87
+ - "--title"
88
+ - Ruby/Extensions API Documentation
89
+ - "--main"
90
+ - README
91
+ - "--inline-source"
92
+ extra_rdoc_files:
93
+ - README
94
+ executables:
95
+ - rbxtm
96
+ extensions: []
97
+ requirements:
98
+ - "Ruby 1.8 (or 'ruby_shim' from RAA)"
99
+ dependencies: []