mobj 2.9.2 → 2.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmVmNDIyMzc0M2MwNDhmNGUzODBlZWEyYWZmMzMwZDE1MTg2ZWYwZQ==
4
+ M2JjNWRjYWY5ZGY0ZmI5NjNkOGExMmMyNDQwNWZlNDVhZmU4NTQ4NQ==
5
5
  data.tar.gz: !binary |-
6
- NjVmNmMxOWNjZTE1ZWNmMGIwMmFmYzhkYzI5ZmMxYmM5MGJhNzdlNQ==
6
+ NjIyZjE5YWUxODEwZmRmNDczODM5Y2MxODA4MTQ1ZmFmZjlkMjdhYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDk5OTIyYThiMWNkNTYxNWVjODJhYjBkN2YxNjE5ODczMDQ4YzFmNWQ0NDhh
10
- NGZkYWY3ZTBhZjk1M2Q2YTM3OGI2ZmI5YTMzMDE1YTg1ZDE4ZTZhMzg2OWI5
11
- NmZmOTljZWIzZjJlMTczNDZlN2Y1NTg1ZDM3OGEyYjZkZjFhYzE=
9
+ YmYwMjg2NGYyNTMzZTdkY2QwNmY3YjkxMWFmZjIxZTAxNzBmMDNhNTM5OTg4
10
+ ZjdmMTE2MzgzMzBjN2JhODEwMjdlZmRiODFhN2VmZWZmMDM0MDk5MTIyNGZj
11
+ NzMzNDNkYjMyYWJlYzBiYmVkODI0Yzg5YjJlMDcyMDc3MjJmM2Y=
12
12
  data.tar.gz: !binary |-
13
- ODdhMmQ3YmMzZTM1OGE3ZmU4MTMzZjdiMGE5NDdkNWZmMDM3NmNkOTAwNjM4
14
- YjE2M2VlZDUxY2QyNWMyODllMTY1ZmUyNDI2N2Y2OWRlYzdjOTk2MTM0MzZj
15
- M2I1NzQ5NGVmMTNkODU2OTY5NTUxNWI3ZmQ1ZDdmYjM1YzU3MDA=
13
+ YzE1YzE3NmI4NGI3NjhmYzNmYTgyMjg5NDAwMjI5YTk0NTc4MzNjMzAzZTc2
14
+ N2I5ZGJjNjFlZmEyZDY5ZWNlYjAyOWI2Nzc2N2JmOTI2NzhkZTZhZmFkMTQz
15
+ NGIwOTgyZmMxN2MxMDA4N2Y3ZDUwN2FmYzg0ZjA4OGNmZTFiMDE=
data/lib/ext/array.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  module Mobj
2
2
 
3
3
  class ::Array
4
- alias includes? include?
5
- alias contains? include?
4
+ alias_method :includes?, :include?
5
+ alias_method :contains?, :include?
6
6
 
7
7
  def unempty?()
8
8
  !empty?
data/lib/ext/hash.rb CHANGED
@@ -65,9 +65,9 @@ module Mobj
65
65
  class ::Hash
66
66
  include HashEx
67
67
 
68
- alias :mlookup :[]
69
- alias :mdef :default
70
- alias :mfetch :fetch
68
+ alias_method :mlookup, :[]
69
+ alias_method :mdef, :default
70
+ alias_method :mfetch, :fetch
71
71
 
72
72
  def [](*fkeys)
73
73
  fkeys.map { |key| mlookup(key) || mfetch(key.sym) { mfetch(key.to_s) { mfetch(ki(key).sym) { mfetch(ki(key).to_s) { mdef(key) } } } } }.sequester
data/lib/ext/nil.rb CHANGED
@@ -10,6 +10,10 @@ module Mobj
10
10
  end
11
11
  end
12
12
 
13
+ def zero?
14
+ true
15
+ end
16
+
13
17
  def null?(*)
14
18
  @@null ||= nil
15
19
  @@null && @@null == __mobj__caller
data/lib/ext/object.rb CHANGED
@@ -1,7 +1,14 @@
1
1
  module Mobj
2
2
 
3
3
  class ::Object
4
- alias responds_to? respond_to?
4
+ alias_method :responds_to?, :respond_to?
5
+
6
+ def i!() respond_to?(:to_i) ? to_i : to_s.to_i end
7
+ def f!() respond_to?(:to_f) ? to_f : to_s.to_f end
8
+ def z?() respond_to?(:zero?) ? zero? : f!.zero? end
9
+ def zeno!() z? ? 1 : self end
10
+
11
+ alias_method :n?, :nil?
5
12
 
6
13
  def rand?
7
14
  rand(1000000).odd?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobj
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.2
4
+ version: 2.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mason
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-26 00:00:00.000000000 Z
11
+ date: 2013-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec