rdl 1.0.0.rc4 → 1.0.0.rc5
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/rdl.gemspec +1 -1
- data/types/ruby-2.x/class.rb +3 -3
- data/types/ruby-2.x/date.rb +2 -2
- data/types/ruby-2.x/exception.rb +10 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f08d83f1ab28460fdf388e66bb895301e15074de
|
4
|
+
data.tar.gz: 3aa93fb286eaa230381861d94eb5c3c84d1216c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b40bbe4769252d20b12908a0d60fddb5a361c33cf129142bf9d408203f81d4829d11c86cd43f57065f727d0c46bb56ffa93a40796b3842a88e698cc78f224327
|
7
|
+
data.tar.gz: a86819890911ddc6177ab05b83f0f38725e3e801bb59812ce4aeadbbecdec14656955a6ea33b485dabc90f7f91c07a06f2fef5bc0f055bf46e4c6b5d552d9c50
|
data/README.md
CHANGED
@@ -39,7 +39,7 @@ RDL contracts and types are stored in memory at run time, so it's also possible
|
|
39
39
|
> rdl_query 'hash' # get type for instance method of current class
|
40
40
|
Object#hash: () -> Fixnum
|
41
41
|
=> nil
|
42
|
-
> rdl_query 'String#include' # get type for instance method of another class
|
42
|
+
> rdl_query 'String#include?' # get type for instance method of another class
|
43
43
|
String#include?: (String) -> FalseClass or TrueClass
|
44
44
|
=> nil
|
45
45
|
> rdl_query 'Pathname.glob' # get type for singleton method of a class
|
data/rdl.gemspec
CHANGED
data/types/ruby-2.x/class.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
class Class
|
2
2
|
rdl_nowrap
|
3
3
|
|
4
|
-
type
|
5
|
-
type
|
4
|
+
type :allocate, '() -> %any' # Instance of class self
|
5
|
+
type :inherited, '(Class) -> %any'
|
6
6
|
#type 'initialize', '() -> '
|
7
7
|
#type 'new', '(*%any) -> %any' #Causes two other test cases to fail
|
8
|
-
type
|
8
|
+
type :superclass, '() -> Class or nil'
|
9
9
|
|
10
10
|
# type :class_eval, '() {() -> %any} -> %any'
|
11
11
|
# type :method_defined?, '(String or Symbol) -> %bool'
|
data/types/ruby-2.x/date.rb
CHANGED
data/types/ruby-2.x/exception.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
class Exception
|
2
2
|
rdl_nowrap
|
3
|
-
|
4
|
-
type
|
5
|
-
type
|
6
|
-
type
|
7
|
-
type
|
8
|
-
type
|
3
|
+
|
4
|
+
type :==, '(%any) -> %bool'
|
5
|
+
type :backtrace, '() -> Array<String>'
|
6
|
+
type :backtrace_locations, '() -> Array<Thread::Backtrace::Location>'
|
7
|
+
type :cause, '() -> nil' # TODO exception is proper postcondition
|
8
|
+
type :exception, '(?String) -> Exception' # or error
|
9
9
|
# type 'initialize', '() -> '
|
10
|
-
type
|
11
|
-
type
|
10
|
+
type :inspect, '() -> String'
|
11
|
+
type :message, '() -> String'
|
12
12
|
# type 'method_missing', '() -> '
|
13
13
|
# type 'respond_to?', '() -> '
|
14
14
|
# type 'respond_to_missing?', '() -> '
|
15
|
-
type
|
16
|
-
type
|
15
|
+
type :set_backtrace, '(String or Array<String>) -> Array<String>'
|
16
|
+
type :to_s, '() -> String'
|
17
17
|
end
|