Skip to content

Commit

Permalink
Eliminate TAINTED_F flag
Browse files Browse the repository at this point in the history
Other flags needed to be shifted, which I was afraid of before but
now I have no fear.
  • Loading branch information
headius committed Mar 30, 2024
1 parent ef68a25 commit 31807bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions core/src/main/java/org/jruby/ObjectFlags.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ public interface ObjectFlags {
int NIL_F = registry.newFlag(RubyBasicObject.class);
int FROZEN_F = registry.newFlag(RubyBasicObject.class);

// Deprecated and unused but don't move due to checks elsewhere for the following flags
@Deprecated
int TAINTED_F = registry.newFlag(RubyBasicObject.class);

int CACHEPROXY_F = registry.newFlag(RubyModule.class);
int NEEDSIMPL_F = registry.newFlag(RubyModule.class);
int REFINED_MODULE_F = registry.newFlag(RubyModule.class);
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/util/StringSupport.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public final class StringSupport {
public static final int CR_UNKNOWN = 0;

// We hardcode these so they can be used in a switch below. The assert verifies they match FlagRegistry's value.
public static final int CR_7BIT = 16;
public static final int CR_VALID = 32;
public static final int CR_7BIT = 8;
public static final int CR_VALID = 16;
static {
assert CR_7BIT == CR_7BIT_F : "CR_7BIT = " + CR_7BIT + " but should be " + CR_7BIT_F;
assert CR_VALID == CR_VALID_F : "CR_VALID = " + CR_VALID + " but should be " + CR_VALID_F;
Expand Down

0 comments on commit 31807bc

Please sign in to comment.