-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed conflicting tests for yield analysis.
Since the new 'warn about overriding block_given?' tests introduce a class which overrides block_given?, the yield tests were noticing the existence of a block_given? which was not Kernel#block_given?. Since the old yield tests were methods on Object, and not on a particular class, they had to decide each method was block-optional. By isolating each test in a class not equal to the ones introduced in the override-warning specs, the yield tests no longer fail.
- Loading branch information
Michael Edgar
committed
Aug 22, 2011
1 parent
8d46a07
commit 18f028d
Showing
8 changed files
with
186 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
module Kernel | ||
# pure: true | ||
# builtin: true | ||
# raises: never | ||
# returns: Boolean | ||
def eql?(other) | ||
end | ||
# pure: true | ||
# builtin: true | ||
# raises: never | ||
# returns: Boolean | ||
def equal?(other) | ||
end | ||
# builtin: true | ||
# klass: Module | ||
# raises: never | ||
def is_a?(klass) | ||
end | ||
alias kind_of? is_a? | ||
# pure: true | ||
# raises: never | ||
# builtin: true | ||
def singleton_class | ||
end | ||
# pure: true | ||
# raises: never | ||
# builtin: true | ||
# returns: Class= | ||
def class | ||
end | ||
# pure: true | ||
# raises: never | ||
def inspect | ||
end | ||
# builtin: true | ||
def instance_variable_get(name) | ||
end | ||
# builtin: true | ||
def instance_variable_defined?(name) | ||
end | ||
# builtin: true | ||
def instance_variable_set(name, val) | ||
end | ||
private | ||
|
||
|
||
# raises: never | ||
# returns: Symbol= | NilClass= | ||
# builtin: true | ||
# special: true | ||
def __method__ | ||
end | ||
alias __callee__ __method__ | ||
|
||
# raises: never | ||
# returns: Binding= | ||
# builtin: true | ||
# special: true | ||
def binding | ||
end | ||
|
||
# raises: never | ||
# returns: Array= | ||
# builtin: true | ||
# special: true | ||
def caller | ||
end | ||
|
||
# raises: never | ||
# returns: Continuation= | ||
# builtin: true | ||
# special: true | ||
def callcc | ||
end | ||
|
||
# yield_usage: required | ||
def proc | ||
unless block_given? | ||
raise ArgumentError.new('tried to create Proc object without a block') | ||
end | ||
Proc.new | ||
end | ||
|
||
# raises: never | ||
def p(*args) | ||
args | ||
end | ||
def eval(string, bndg = nil, filename = nil, lineno = nil) | ||
end | ||
def autoload(sym, path) | ||
end | ||
alias fail raise | ||
# predictable: false | ||
# returns: String= | ||
# raises: maybe | ||
def gets(opt_arg_1 = :__unset__, opt_arg_2 = :__unset__) | ||
end | ||
# predictable: false | ||
def puts(*to_put) | ||
end | ||
# returns: Boolean | ||
# raises: never | ||
def block_given? | ||
end | ||
alias iterator? block_given? | ||
# builtin: true | ||
# raises: never | ||
# pure: false | ||
# predictable: false | ||
# overload: () -> Float | ||
# overload: Fixnum= -> Fixnum= | Bignum= | ||
# overload: Bignum= -> Fixnum= | Bignum= | ||
def rand(n=nil) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters