Skip to content
Browse files

fix rubyspec about default value for skip in Kernel#caller

  • Loading branch information...
1 parent fd5a153 commit e28a1618de6d1f70ec10f348f1ec795c424af880 @timfel timfel committed May 8, 2012
Showing with 1 addition and 2 deletions.
  1. +0 −1 spec/tags/core/kernel/caller_tags.txt
  2. +1 −1 src/kernel/bootstrap/Kernel.rb
View
1 spec/tags/core/kernel/caller_tags.txt
@@ -1,4 +1,3 @@
-fails:Kernel#caller defaults to omitting one frame
fails:Kernel#caller in a Proc or eval returns the definition trace of a block when evaluated in a Proc binding
fails:Kernel#caller in a Proc or eval returns the definition trace of a Proc
fails:Kernel#caller in a Proc or eval returns the correct definition line for a complex Proc trace
View
2 src/kernel/bootstrap/Kernel.rb
@@ -115,7 +115,7 @@ def method_missing(method_id, *args)
# optional +skip+ parameter determines the number of initial stack
# entries to omit from the result. The optional +limit+ parameter
# determines the maximum number of frames to return.
- def caller(skip=0, limit=1000)
+ def caller(skip=1, limit=1000)
# returns an Array of Strings, each element describes a stack frame
unless skip._isFixnum
raise ArgumentError

0 comments on commit e28a161

Please sign in to comment.
Something went wrong with that request. Please try again.