Duplicate operators in selector.js
Reported by Richard Quadling | June 3rd, 2008 @ 02:41 PM | in 1.6.0.4
There are an additional $= and *= in selector.operators (selector.js line 656).
Considering the commit added "nv == v || ", the attached patch will remove the old operators.
But I am not sure enough to know if it is right or wrong, sorry.
Regards,
Richard Quadling.
Comments and changes to this ticket
-
John-David Dalton June 3rd, 2008 @ 11:38 PM
- → Milestone changed from to 1.6.0.3
- → State changed from new to bug
- → Assigned user changed from to Andrew Dupont
good catch :).
Its that way in my fork as well.
I will correct that.
-
-
Andrew Dupont June 9th, 2008 @ 09:50 PM
- → State changed from bug to resolved
-

Richard Quadling September 29th, 2008 @ 04:35 PM
- → Tag changed from to patched selector
Can someone fix the documentation for where to get the source please?
This bug exists in git clone git://github.com/sstephenson/prototype.git (via http://prototypejs.org/download)
but not in http://prototypejs.org/assets/20...
I don't know who is in charge of this project anymore. It is confusing who is contributing. Different people with their own versions.
Regards,
Richard.
-

Richard Quadling September 29th, 2008 @ 04:40 PM
Ah Stupid me. Did a search for '*= and didn't search the entire script.
The problem still exists in git and in the release.
Line 3382 and 3383 in http://prototypejs.org/assets/20...
-
John-David Dalton September 29th, 2008 @ 09:18 PM
- → Milestone changed from 1.6.0.3 to 1.6.1
- → State changed from resolved to new
-
Tobie Langel September 29th, 2008 @ 10:58 PM
We should be using:
'$=': function(nv, v) { return (nv || '').endsWith(v); }, '*=': function(nv, v) { return (nv || '').include(v); },The nv == v should belong in the String.prototype methods themselves if there's a benchmarkable performance reason to do so.
-
Tobie Langel September 29th, 2008 @ 11:03 PM
- → State changed from new to bug
-
John-David Dalton September 29th, 2008 @ 11:08 PM
- → State changed from bug to new
Original commit: http://github.com/sstephenson/prototype/commit/35a70710b0cec60598ff64715316032e16cd5c87
also removes the "=" operator, I wonder if that was intentional
-
John-David Dalton September 29th, 2008 @ 11:39 PM
Turns out the "=" and "!=" were added again in later commits (so that is not an issue).
-
John-David Dalton September 30th, 2008 @ 04:24 AM
- → State changed from new to bug
-
John-David Dalton September 30th, 2008 @ 04:25 AM
- → Milestone changed from 1.6.1 to 1.6.0.4
-

Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
