* [ruby-core:77219] [Ruby trunk Feature#12739] deprecate_constant :Fixnum, :Bignum
[not found] <redmine.issue-12739.20160908144250@ruby-lang.org>
@ 2016-09-08 14:42 ` zn
2016-09-10 4:33 ` [ruby-core:77240] " nobu
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: zn @ 2016-09-08 14:42 UTC (permalink / raw)
To: ruby-core
Issue #12739 has been reported by Kazuhiro NISHIYAMA.
----------------------------------------
Feature #12739: deprecate_constant :Fixnum, :Bignum
https://bugs.ruby-lang.org/issues/12739
* Author: Kazuhiro NISHIYAMA
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
How about `class Object; deprecate_constant :Fixnum, :Bignum; end`?
* naruse supports: https://twitter.com/nalsh/status/773800491671101441
* akr objects: https://twitter.com/tanaka_akr/status/773817391218249729
I don't mind either way.
Do you have any comment about it?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:77240] [Ruby trunk Feature#12739] deprecate_constant :Fixnum, :Bignum
[not found] <redmine.issue-12739.20160908144250@ruby-lang.org>
2016-09-08 14:42 ` [ruby-core:77219] [Ruby trunk Feature#12739] deprecate_constant :Fixnum, :Bignum zn
@ 2016-09-10 4:33 ` nobu
2017-06-04 21:44 ` [ruby-core:81570] " rob
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: nobu @ 2016-09-10 4:33 UTC (permalink / raw)
To: ruby-core
Issue #12739 has been updated by Nobuyoshi Nakada.
I tried [this], found rake defines `Fixnum::MAX` which seems useless, and submitted a [PR] to rake.
But it fails on ruby 2.2 or earlier, due to incompatibility of Bundler 1.13.0.
[this]: https://github.com/ruby/ruby/compare/trunk...nobu:feature/12739-deprecate-fixnum-bignum
[PR]: https://github.com/ruby/rake/pull/160
----------------------------------------
Feature #12739: deprecate_constant :Fixnum, :Bignum
https://bugs.ruby-lang.org/issues/12739#change-60464
* Author: Kazuhiro NISHIYAMA
* Status: Open
* Priority: Normal
* Assignee:
----------------------------------------
How about `class Object; deprecate_constant :Fixnum, :Bignum; end`?
* naruse supports: https://twitter.com/nalsh/status/773800491671101441
* akr objects: https://twitter.com/tanaka_akr/status/773817391218249729
I don't mind either way.
Do you have any comment about it?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:81570] [Ruby trunk Feature#12739] deprecate_constant :Fixnum, :Bignum
[not found] <redmine.issue-12739.20160908144250@ruby-lang.org>
2016-09-08 14:42 ` [ruby-core:77219] [Ruby trunk Feature#12739] deprecate_constant :Fixnum, :Bignum zn
2016-09-10 4:33 ` [ruby-core:77240] " nobu
@ 2017-06-04 21:44 ` rob
2017-06-04 21:54 ` [ruby-core:81571] " rob
2017-06-16 13:28 ` [ruby-core:81711] " zn
4 siblings, 0 replies; 5+ messages in thread
From: rob @ 2017-06-04 21:44 UTC (permalink / raw)
To: ruby-core
Issue #12739 has been updated by robertgleeson (Robert Gleeson).
znz (Kazuhiro NISHIYAMA) wrote:
> How about `class Object; deprecate_constant :Fixnum, :Bignum; end`?
>
> * naruse supports: https://twitter.com/nalsh/status/773800491671101441
> * akr objects: https://twitter.com/tanaka_akr/status/773817391218249729
>
> I don't mind either way.
> Do you have any comment about it?
It would be nice to have `constant_deprecated?`.
To avoid all of these warnings while supporting <2.4 and >=2.4 i track what constants are deprecated in an array, and
then avoid using them or not by checking the array at runtime. It's bit of a pain..
----------------------------------------
Feature #12739: deprecate_constant :Fixnum, :Bignum
https://bugs.ruby-lang.org/issues/12739#change-65272
* Author: znz (Kazuhiro NISHIYAMA)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
How about `class Object; deprecate_constant :Fixnum, :Bignum; end`?
* naruse supports: https://twitter.com/nalsh/status/773800491671101441
* akr objects: https://twitter.com/tanaka_akr/status/773817391218249729
I don't mind either way.
Do you have any comment about it?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:81571] [Ruby trunk Feature#12739] deprecate_constant :Fixnum, :Bignum
[not found] <redmine.issue-12739.20160908144250@ruby-lang.org>
` (2 preceding siblings ...)
2017-06-04 21:44 ` [ruby-core:81570] " rob
@ 2017-06-04 21:54 ` rob
2017-06-16 13:28 ` [ruby-core:81711] " zn
4 siblings, 0 replies; 5+ messages in thread
From: rob @ 2017-06-04 21:54 UTC (permalink / raw)
To: ruby-core
Issue #12739 has been updated by robertgleeson (Robert Gleeson).
robertgleeson (Robert Gleeson) wrote:
> znz (Kazuhiro NISHIYAMA) wrote:
> > How about `class Object; deprecate_constant :Fixnum, :Bignum; end`?
> >
> > * naruse supports: https://twitter.com/nalsh/status/773800491671101441
> > * akr objects: https://twitter.com/tanaka_akr/status/773817391218249729
> >
> > I don't mind either way.
> > Do you have any comment about it?
>
> It would be nice to have `constant_deprecated?`.
> To avoid all of these warnings while supporting <2.4 and >=2.4 i track what constants are deprecated in an array, and
> then avoid using them or not by checking the array at runtime. It's bit of a pain..
I realise my comment isn't clear, here's very simple code to show what i mean:
deprecated_constants = [:Fixnum, :TimeoutError, :Bignum, :FALSE, :TRUE, :NIL]
Object.constants.each do |constant|
const_get(constant) unless deprecated_constants.include?(constant)
end
the real code i have is more complex, but in essence this is the problem,
and deprecated_constants has to be maintained by me manually, which
will become out of date over time.
----------------------------------------
Feature #12739: deprecate_constant :Fixnum, :Bignum
https://bugs.ruby-lang.org/issues/12739#change-65273
* Author: znz (Kazuhiro NISHIYAMA)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
How about `class Object; deprecate_constant :Fixnum, :Bignum; end`?
* naruse supports: https://twitter.com/nalsh/status/773800491671101441
* akr objects: https://twitter.com/tanaka_akr/status/773817391218249729
I don't mind either way.
Do you have any comment about it?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:81711] [Ruby trunk Feature#12739] deprecate_constant :Fixnum, :Bignum
[not found] <redmine.issue-12739.20160908144250@ruby-lang.org>
` (3 preceding siblings ...)
2017-06-04 21:54 ` [ruby-core:81571] " rob
@ 2017-06-16 13:28 ` zn
4 siblings, 0 replies; 5+ messages in thread
From: zn @ 2017-06-16 13:28 UTC (permalink / raw)
To: ruby-core
Issue #12739 has been updated by znz (Kazuhiro NISHIYAMA).
Closed ticket should not be reused.
Please open new ticket.
----------------------------------------
Feature #12739: deprecate_constant :Fixnum, :Bignum
https://bugs.ruby-lang.org/issues/12739#change-65409
* Author: znz (Kazuhiro NISHIYAMA)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
How about `class Object; deprecate_constant :Fixnum, :Bignum; end`?
* naruse supports: https://twitter.com/nalsh/status/773800491671101441
* akr objects: https://twitter.com/tanaka_akr/status/773817391218249729
I don't mind either way.
Do you have any comment about it?
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-16 13:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-12739.20160908144250@ruby-lang.org>
2016-09-08 14:42 ` [ruby-core:77219] [Ruby trunk Feature#12739] deprecate_constant :Fixnum, :Bignum zn
2016-09-10 4:33 ` [ruby-core:77240] " nobu
2017-06-04 21:44 ` [ruby-core:81570] " rob
2017-06-04 21:54 ` [ruby-core:81571] " rob
2017-06-16 13:28 ` [ruby-core:81711] " zn
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).