Skip to content

Commit f17c267

Browse files
[DOC] Fix Thread::Mutex#unlock doc
It was [previously][1] moved from C to Ruby, but the doc on the Ruby method was copied from `#lock` while the correct doc was left in C. [1]: 07b2356
1 parent 821b84b commit f17c267

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

thread_sync.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -504,13 +504,6 @@ do_mutex_unlock_safe(VALUE args)
504504
return Qnil;
505505
}
506506

507-
/*
508-
* call-seq:
509-
* mutex.unlock -> self
510-
*
511-
* Releases the lock.
512-
* Raises +ThreadError+ if +mutex+ wasn't locked by the current thread.
513-
*/
514507
VALUE
515508
rb_mutex_unlock(VALUE self)
516509
{

thread_sync.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,10 @@ def try_lock
371371
end
372372

373373
# call-seq:
374-
# mutex.lock -> self
374+
# mutex.unlock -> self
375375
#
376-
# Attempts to grab the lock and waits if it isn't available.
377-
# Raises +ThreadError+ if +mutex+ was locked by the current thread.
376+
# Releases the lock.
377+
# Raises +ThreadError+ if +mutex+ wasn't locked by the current thread.
378378
def unlock
379379
Primitive.rb_mut_unlock
380380
end

0 commit comments

Comments
 (0)