Project

General

Profile

Backport #8097

Mutex#synchronize block param oddity

Added by splattael (Peter Suschlik) almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:53424]

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

Associated revisions

Revision 99155e20
Added by nobu (Nobuyoshi Nakada) over 6 years ago

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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 40000
Added by nobu (Nobuyoshi Nakada) over 6 years ago

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.

Revision 40000
Added by nobu (Nobuyoshi Nakada) over 6 years ago

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.

Revision 40000
Added by nobu (Nobuyoshi Nakada) over 6 years ago

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.

Revision 40000
Added by nobu (Nobuyoshi Nakada) over 6 years ago

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.

Revision 40000
Added by nobu (Nobuyoshi Nakada) over 6 years ago

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.

Revision 40000
Added by nobu (Nobuyoshi Nakada) over 6 years ago

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.

Revision 26de6120
Added by nagachika (Tomoyuki Chikanaga) over 6 years ago

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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 40380
Added by nagachika (Tomoyuki Chikanaga) over 6 years ago

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.

History

Updated by splattael (Peter Suschlik) over 6 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

#2

Updated by nobu (Nobuyoshi Nakada) over 6 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.
#3

Updated by nagachika (Tomoyuki Chikanaga) over 6 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.

#4

Updated by nagachika (Tomoyuki Chikanaga) over 6 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.

Also available in: Atom PDF