1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix typos, grammar, and style

This commit is contained in:
Marcus Stollsteimer 2019-05-04 15:31:21 +02:00
parent 8bf3040e30
commit a380f4c2b7

View file

@ -1,6 +1,6 @@
class << Thread class << Thread
# call-seq: # call-seq:
# Thread.exclusive { block } => obj # Thread.exclusive { block } -> obj
# #
# Wraps the block in a single, VM-global Mutex.synchronize, returning the # Wraps the block in a single, VM-global Mutex.synchronize, returning the
# value of the block. A thread executing inside the exclusive section will # value of the block. A thread executing inside the exclusive section will
@ -137,10 +137,10 @@ class TracePoint
# trace.enable(target: nil, target_line: nil) -> true or false # 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) { block } -> obj
# #
# Activates the trace # Activates the trace.
# #
# Return +true+ if trace was enabled. # Returns +true+ if trace was enabled.
# Return +false+ if trace was disabled. # Returns +false+ if trace was disabled.
# #
# trace.enabled? #=> false # trace.enabled? #=> false
# trace.enable #=> false (previous state) # trace.enable #=> false (previous state)
@ -165,7 +165,7 @@ class TracePoint
# #
# <i>target</i> and <i>target_line</i> parameters are used to limit tracing # <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 # 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 } # t = TracePoint.new(:line) { |tp| p tp }
# #
@ -184,7 +184,6 @@ class TracePoint
# m2 # m2
# # prints nothing # # prints nothing
# #
#
# Note: You cannot access event hooks within the +enable+ block. # Note: You cannot access event hooks within the +enable+ block.
# #
# trace.enable { p tp.lineno } # trace.enable { p tp.lineno }