Project

General

Profile

This project is closed and read-only.

Actions

Backport #8097

closed

Mutex#synchronize block param oddity

Backport #8097: Mutex#synchronize block param oddity

Added by splattael (Peter Leitzen) over 13 years ago. Updated over 13 years ago.


Description

In 1.9.3 Mutex#synchronize yield nothing.

In 2.0.0 Mutex#synchronize yields nil.

require 'thread'

Mutex.new.synchronize do |*args|
p RUBY_VERSION => args
end

See https://gist.github.com/splattael/5164747

Updated by splattael (Peter Leitzen) over 13 years ago Actions #1 [ruby-core:53773]

I've create a pull request on GitHub which fixes this issue:
https://github.com/ruby/ruby/pull/266

The patch:
https://github.com/ruby/ruby/pull/266.patch

Updated by nobu (Nobuyoshi Nakada) over 13 years ago Actions #2

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r40000.
Peter, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


thread.c: Mutex#synchronize no block params

  • thread.c (rb_mutex_synchronize_m): yield no block params. patch by
    splattael (Peter Suschlik) in [ruby-core:53773] [Bug #8097].
    fix GH-266.

Updated by nagachika (Tomoyuki Chikanaga) over 13 years ago Actions #3

  • Tracker changed from Bug to Backport
  • Project changed from Ruby to 15
  • Status changed from Closed to Assigned
  • Assignee set to nagachika (Tomoyuki Chikanaga)

I believe this is a regression of 2.0.0-p0. I'll backport r40000 to ruby_2_0_0.

Updated by nagachika (Tomoyuki Chikanaga) over 13 years ago Actions #4

  • Status changed from Assigned to Closed

This issue was solved with changeset r40380.
Peter, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 40000: [Backport #8097]

* thread.c (rb_mutex_synchronize_m): yield no block params.  patch by
  splattael (Peter Suschlik) in [ruby-core:53773] [Bug #8097].
  fix GH-266.
Actions

Also available in: PDF Atom