Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9140 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Add missing semi-colons

Reported by: jdalton Assigned to: sam
Priority: low Milestone: 1.x
Component: Prototype Version: edge
Severity: normal Keywords:
Cc:

Description

I have done all the work finding the missing semi-colons. You can download the formatted code for all the Prototype major releases and the 1.5.2_pre0 release.

http://groups.google.com/group/prototype-core/files protopacked_v2.16b.zip

I haven't made a patch because the source code is always changing. I will try on the latest and update this ticket with a patch at a later time.

Attachments

added_semicolon.diff (7.4 kB) - added by jdalton on 08/06/07 15:28:25.
Added some missing semi-colons and removed them from one-liner blocks per Mislavs request (compressed successfully via Dean's packer)

Change History

07/30/07 16:24:37 changed by kampers

  • status changed from new to closed.
  • type changed from defect to enhancement.
  • resolution set to wontfix.

This has been proposed quite a few times and the Prototype core team is pretty unreceptive. See #7311, #8680, #4729, #7301, and so on. So, I'll close this as wontfix. Your best move is probably to bring this up on the Prototype Core mailing list. If they change their minds, please feel free to reopen this with a patch and/or failing test case. Thanks.

07/30/07 16:37:21 changed by jdalton

  • summary changed from Add the missing semi-colons to the code to allow for easy compression. to [PATCH] Add the missing semi-colons to the code to allow for easy compression..

08/05/07 00:39:20 changed by mislav

  • priority changed from normal to low.
  • status changed from closed to reopened.
  • resolution deleted.
  • summary changed from [PATCH] Add the missing semi-colons to the code to allow for easy compression. to [PATCH] Add missing semi-colons.

Can you please re-post the patch, but this time without adding semicolons to one-liner blocks like:

catch (e) { return null }

We in Prototype core (especially Sam) don't like semicolons there. But, all other cases in the patch (most of them are after object literals) are valid and I will see if that can be accepted. If we are already using semicolon like this:

var foo = bar;

Then I think we must be consistent with object literals, also:

var foo = {
  bar: baz,
  baz: spaz
};

After you re-post the patch as I suggested, I will bring this discussion up internally in core. Thanks.

08/06/07 15:28:25 changed by jdalton

  • attachment added_semicolon.diff added.

Added some missing semi-colons and removed them from one-liner blocks per Mislavs request (compressed successfully via Dean's packer)

08/06/07 15:28:54 changed by jdalton

The patch is reposted with a few more semi colons caught and tested successfully compressed via Dean Edward's Packer v3. Also I removed the one-liner blocks as you requested. The patch is for rev 7278.

08/06/07 15:55:24 changed by jdalton

Let me stress this patch DOES NOT change any of the syntax to work with a specific compressor/packer. This patch simply adds missing semi-colons and makes the code more consistent with current code in the framework. I have tested with Dean's Packer, but did not tailer the code for it.

08/07/07 18:57:05 changed by jdalton

patch is still valid for rev 7283

08/07/07 19:41:18 changed by sam

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [7285]) prototype: Add some missing semicolons to the source tree. Closes #9140.