URL: http://github.com/jruby/jruby/commit/08a9ee7c97fef22ae92451186dfad8a798a65705
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33693f9 commit 08a9ee7Copy full SHA for 08a9ee7
1 file changed
core/src/main/java/org/jruby/util/IdUtil.java
@@ -109,18 +109,12 @@ public static boolean isValidInstanceVariableName(String id) {
109
return false;
110
}
111
112
- // Pickaxe says @@ must be followed by a name character, but MRI
113
- // does not require this.
114
public static boolean isValidClassVariableName(String id) {
115
int len;
116
- if ((len = id.length()) > 1 && '@' == id.charAt(0) && '@' == id.charAt(1)) {
117
- if (len > 2) {
118
- if (isInitialCharacter(id.charAt(2))) {
119
- return isNameString(id, 3, len);
120
- }
121
- return false;
+ if ((len = id.length()) > 2 && '@' == id.charAt(0) && '@' == id.charAt(1)) {
+ if (isInitialCharacter(id.charAt(2))) {
+ return isNameString(id, 3, len);
122
123
- return true;
124
125
126
0 commit comments