Project

General

Profile

Actions

Backport #8097

closed

Mutex#synchronize block param oddity

Added by splattael (Peter Leitzen) about 11 years ago. Updated almost 11 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) about 11 years ago

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

Actions #2

Updated by nobu (Nobuyoshi Nakada) about 11 years ago

  • 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.
Actions #3

Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport200
  • 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.

Actions #4

Updated by nagachika (Tomoyuki Chikanaga) almost 11 years ago

  • 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: Atom PDF

Like0
Like0Like0Like0Like0