ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: nagachika00@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:78129] [Ruby trunk Bug#12876] Calling new hangs Ruby when class prepends an empty module and makes initialize method public
Date: Mon, 14 Nov 2016 17:59:46 +0000	[thread overview]
Message-ID: <redmine.journal-61491.20161114175946.3051139da6146f81@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-12876.20161027141844@ruby-lang.org

Issue #12876 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE

ruby_2_3 r56783 merged revision(s) 56520.

----------------------------------------
Bug #12876: Calling new hangs Ruby when class prepends an empty module and makes initialize method public
https://bugs.ruby-lang.org/issues/12876#change-61491

* Author: James Mead
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* ruby -v: ruby 2.0.0p648 and ruby 2.1.3p242 onwards
* Backport: 2.1: REQUIRED, 2.2: REQUIRED, 2.3: DONE
----------------------------------------
```ruby
module Foo
end

class Bar
  prepend Foo

  public :initialize
end

p Bar.new # => hangs
```

## Runs OK

* ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin14.0]
* ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin14.0]
* ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin14.0]
* rubinius 3.33 (2.2.2 db6f477e 2016-05-23 3.8.1) [x86_64-darwin14.5.0]

## Hangs on last line

* ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-darwin14.5.0]
* ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
* ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
* ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-darwin14.0]
* ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin14]
* ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14]
* ruby 2.4.0preview2 (2016-09-09 trunk 56129) [x86_64-darwin14]

This might be related to Bug #12832, although in this case it is possible to interrupt with ctrl-C and the problem exists in Ruby v2.0.0 as well as v2.1.3 onwards.




-- 
https://bugs.ruby-lang.org/

      parent reply	other threads:[~2016-11-14 17:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-12876.20161027141844@ruby-lang.org>
2016-10-27 14:18 ` [ruby-core:77784] [Ruby trunk Bug#12876] Calling new hangs Ruby when class prepends an empty module and makes initialize method public james
2016-10-28  5:33 ` [ruby-core:77791] [Ruby trunk Bug#12876][Assigned] " shyouhei
2016-10-29 18:18 ` [ruby-core:77810] [Ruby trunk Bug#12876] " nagachika00
2016-11-14 17:59 ` nagachika00 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-61491.20161114175946.3051139da6146f81@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).