Skip to content

Commit

Permalink
Remove tai-offset-nanos from CORE::.keys
Browse files Browse the repository at this point in the history
This constant is an implementation detail and should not be visible
outside of the sub that needs it.
  • Loading branch information
lizmat committed Oct 22, 2021
1 parent 6d45da8 commit a8c579b
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion src/core.c/Instant.pm6
Expand Up @@ -125,10 +125,10 @@ sub term:<time>(--> Int:D) { nqp::time() div 1000000000 }
# 37 is $initial-offset from Rakudo::Internals + # of years
# that have had leap seconds so far. Will need to be incremented
# when new leap seconds occur.
my int constant \tai-offset-nanos = 37 * 1000000000;
sub term:<now>(--> Instant:D) {
# FIXME: During a leap second, the returned value is one
# second greater than it should be.
my int constant \tai-offset-nanos = 37 * 1000000000;
Instant.from-posix-nanos(nqp::add_i(nqp::time,tai-offset-nanos))
}

Expand Down
1 change: 0 additions & 1 deletion t/02-rakudo/03-corekeys-6c.t
Expand Up @@ -766,7 +766,6 @@ my @expected = (
Q{Ο€},
Q{Ο„},
Q{𝑒},
Q{tai-offset-nanos},
);

my %nyi-for-backend = (
Expand Down
1 change: 0 additions & 1 deletion t/02-rakudo/03-corekeys-6d.t
Expand Up @@ -766,7 +766,6 @@ my @expected = (
Q{Ο€},
Q{Ο„},
Q{𝑒},
Q{tai-offset-nanos},
);

my %nyi-for-backend = (
Expand Down
1 change: 0 additions & 1 deletion t/02-rakudo/03-corekeys-6e.t
Expand Up @@ -768,7 +768,6 @@ my @expected = (
Q{Ο€},
Q{Ο„},
Q{𝑒},
Q{tai-offset-nanos},
);

my %nyi-for-backend = (
Expand Down
1 change: 0 additions & 1 deletion t/02-rakudo/03-corekeys.t
Expand Up @@ -769,7 +769,6 @@ my @allowed =
Q{Ο€},
Q{Ο„},
Q{𝑒},
Q{tai-offset-nanos},
),
d => (
Q{$!},
Expand Down
1 change: 0 additions & 1 deletion t/02-rakudo/04-settingkeys-6c.t
Expand Up @@ -766,7 +766,6 @@ my %allowed = (
Q{Ο€},
Q{Ο„},
Q{𝑒},
Q{tai-offset-nanos},
).map: { $_ => 1 };

my %nyi-for-backend = (
Expand Down
1 change: 0 additions & 1 deletion t/02-rakudo/04-settingkeys-6e.t
Expand Up @@ -766,7 +766,6 @@ my %allowed = (
Q{Ο€},
Q{Ο„},
Q{𝑒},
Q{tai-offset-nanos},
).map: { $_ => 1 };

my %nyi-for-backend = (
Expand Down

0 comments on commit a8c579b

Please sign in to comment.