diff options
author | Marcus Stollsteimer <sto.mar@web.de> | 2019-05-04 15:31:21 +0200 |
---|---|---|
committer | Marcus Stollsteimer <sto.mar@web.de> | 2019-05-04 15:31:21 +0200 |
commit | a380f4c2b7310c85635958c751ac78d7796bc8d2 (patch) | |
tree | 0d24f4d0a0c7d299ec7ef62d3986767c507981bb /prelude.rb | |
parent | 8bf3040e301ffe82ab02df58c89bd1e55bb0980b (diff) | |
download | ruby-a380f4c2b7310c85635958c751ac78d7796bc8d2.tar.gz |
Fix typos, grammar, and style
Diffstat (limited to 'prelude.rb')
-rw-r--r-- | prelude.rb | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/prelude.rb b/prelude.rb index e7125d4de8..c2dc85ad88 100644 --- a/prelude.rb +++ b/prelude.rb @@ -1,6 +1,6 @@ class << Thread # call-seq: - # Thread.exclusive { block } => obj + # Thread.exclusive { block } -> obj # # Wraps the block in a single, VM-global Mutex.synchronize, returning the # value of the block. A thread executing inside the exclusive section will @@ -134,13 +134,13 @@ end class TracePoint # call-seq: - # trace.enable(target: nil, target_line: nil) -> true or false - # trace.enable(target: nil, target_line: nil) { block } -> obj + # trace.enable(target: nil, target_line: nil) -> true or false + # trace.enable(target: nil, target_line: nil) { block } -> obj # - # Activates the trace + # Activates the trace. # - # Return +true+ if trace was enabled. - # Return +false+ if trace was disabled. + # Returns +true+ if trace was enabled. + # Returns +false+ if trace was disabled. # # trace.enabled? #=> false # trace.enable #=> false (previous state) @@ -156,8 +156,8 @@ class TracePoint # #=> false # # trace.enable do - # trace.enabled? - # # only enabled for this block + # trace.enabled? + # # only enabled for this block # end # # trace.enabled? @@ -165,16 +165,16 @@ class TracePoint # # <i>target</i> and <i>target_line</i> parameters are used to limit tracing # only to specified code objects. <i>target</i> should be a code object for - # which RubyVM::InstructionSequence.of will return instruction sequence. + # which RubyVM::InstructionSequence.of will return an instruction sequence. # # t = TracePoint.new(:line) { |tp| p tp } # # def m1 - # p 1 + # p 1 # end # # def m2 - # p 2 + # p 2 # end # # t.enable(target: method(:m1)) @@ -184,7 +184,6 @@ class TracePoint # m2 # # prints nothing # - # # Note: You cannot access event hooks within the +enable+ block. # # trace.enable { p tp.lineno } |