From: stefano.frabetti@... Date: 2017-05-25T08:58:09+00:00 Subject: [ruby-core:81376] [Ruby trunk Bug#13598] mutex_m: Missing info in the doc Issue #13598 has been reported by mala (stefano frabetti). ---------------------------------------- Bug #13598: mutex_m: Missing info in the doc https://bugs.ruby-lang.org/issues/13598 * Author: mala (stefano frabetti) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- The doc for Mutex_m should remind the user of the necessity of calling super() in *each* class that includes Mutex_m. The average user will do: ~~~ require 'mutex_m' class A include Mutex_m def initialize myval @myval = myval # error: no super() end def method @myval end end a = A.new 'abc' a.mu_synchronize{a.method} ~~~ He will get: ~~~ NoMethodError: undefined method `synchronize' for nil:NilClass from /usr/lib64/ruby/2.4.0/mutex_m.rb:74:in `mu_synchronize' ~~~ and will lose the rest of the evening trying to understand what went wrong ;-) ---Files-------------------------------- mutex_m.doc.patch (460 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: