bj_fixed_for_rails3 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/bj/stdext.rb +2 -29
- metadata +3 -4
- data/bj-1.0.2.gem +0 -0
data/lib/bj/stdext.rb
CHANGED
|
@@ -21,33 +21,6 @@ class Hash
|
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
begin
|
|
25
|
-
method "reverse_merge"
|
|
26
|
-
rescue
|
|
27
|
-
def reverse_merge other
|
|
28
|
-
other.merge self
|
|
29
|
-
end
|
|
30
|
-
def reverse_merge! other
|
|
31
|
-
replace reverse_merge(other)
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
begin
|
|
36
|
-
method "slice"
|
|
37
|
-
rescue
|
|
38
|
-
def slice(*keys)
|
|
39
|
-
allowed = Set.new(respond_to?(:convert_key) ? keys.map { |key| convert_key(key) } : keys)
|
|
40
|
-
reject { |key,| !allowed.include?(key) }
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
begin
|
|
45
|
-
method "slice!"
|
|
46
|
-
rescue
|
|
47
|
-
def slice!(*keys)
|
|
48
|
-
replace(slice(*keys))
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
24
|
end
|
|
52
25
|
|
|
53
26
|
class Object
|
|
@@ -63,11 +36,11 @@ end
|
|
|
63
36
|
|
|
64
37
|
class Object
|
|
65
38
|
def singleton_class &block
|
|
66
|
-
@singleton_class
|
|
39
|
+
tmp = @singleton_class ||
|
|
67
40
|
class << self
|
|
68
41
|
self
|
|
69
42
|
end
|
|
70
|
-
block ?
|
|
43
|
+
block ? tmp.module_eval(&block) : tmp
|
|
71
44
|
end
|
|
72
45
|
end
|
|
73
46
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bj_fixed_for_rails3
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 17
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 1.0.
|
|
9
|
+
- 3
|
|
10
|
+
version: 1.0.3
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Ara T. Howard
|
|
@@ -76,7 +76,6 @@ extra_rdoc_files: []
|
|
|
76
76
|
|
|
77
77
|
files:
|
|
78
78
|
- bin/bj
|
|
79
|
-
- bj-1.0.2.gem
|
|
80
79
|
- gemspec.rb
|
|
81
80
|
- HISTORY
|
|
82
81
|
- install.rb
|
data/bj-1.0.2.gem
DELETED
|
Binary file
|