[#75225] [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7) — k@...
Issue #12324 has been reported by Kazuki Yamaguchi.
6 messages
2016/04/27
[#78693] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
k@rhe.jp wrote:
[#78701] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Kazuki Yamaguchi <k@...>
2016/12/17
On Sat, Dec 17, 2016 at 01:31:12AM +0000, Eric Wong wrote:
[#78702] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
Kazuki Yamaguchi <k@rhe.jp> wrote:
[ruby-core:74884] [Ruby trunk Feature#12267][Rejected] REXML Authoring constants are unwanted (or clash) when mixing into other namespaces
From:
kou@...
Date:
2016-04-12 02:08:20 UTC
List:
ruby-core #74884
Issue #12267 has been updated by Kouhei Sutou.
Status changed from Open to Rejected
Assignee set to Kouhei Sutou
You should not include a module when your code may conflict with constants in the module.
----------------------------------------
Feature #12267: REXML Authoring constants are unwanted (or clash) when mixing into other namespaces
https://bugs.ruby-lang.org/issues/12267#change-58011
* Author: Dan Rathbun
* Status: Rejected
* Priority: Normal
* Assignee: Kouhei Sutou
----------------------------------------
The following file can be added, OR it's contents pasted into "rexml/rexml.rb". Basically it renames the authoring constants defined in "rexml/rexml.rb", with a "REXML_" prefix. But it only does so when REXML module is mixed into some other class or module namespace.
```
# -*- encoding: utf-8 -*-
# frozen_string_literal: false
#
# "rexml_mixin.rb" : include() and prepend() control
require "rexml/rexml.rb"
module REXML
###
#
# When mixing the REXML module into other classes and modules,
# RENAME the 6 constants declared in "rexml/rexml.rb", because they
# will likely conflict with the "mixee"'s constants of same name.
#
###
def self::append_features(mod)
[:COPYRIGHT,:DATE,:VERSION,:REVISION,:Copyright,:Version].each {|id|
const_set( "REXML_#{id.to_s}", REXML.const_get(id) )
remove_const(id)
}
super(mod)
end
def self::prepend_features(mod)
[:COPYRIGHT,:DATE,:VERSION,:REVISION,:Copyright,:Version].each {|id|
const_set( "REXML_#{id.to_s}", REXML.const_get(id) )
remove_const(id)
}
super(mod)
end
### Do not think these constants need renaming for extend_object().
end
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>