Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix(angular.copy): change angular.copy to correcly clone RegExp #3474

Closed
wants to merge 1 commit into from

Conversation

AndyHitchman
Copy link
Contributor

angular.copy previously copied RegExp as an empty object. Change detects
RegExp instance and clones into new RegExp. This change is based on a previous
fix to allow Date to be copied.

Closes #3473

angular.copy previously copied RegExp as an empty object. Change detects
RegExp instance and clones into new RegExp. This change is based on a previous
fix to allow Date to be copied.

Closes angular#3473
@mary-poppins
Copy link

Thanks for the PR!

  • Contributor signed CLA now or in the past
    • If you just signed, leave a comment here with your real name
  • PR's commit messages follow the commit message format

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@AndyHitchman
Copy link
Contributor Author

Please note that unit tests reported a failure before (and after) my commit:

Chrome 28.0.1500 (Mac OS X 10.8.4) ngMock TzDate should fake getHours method FAILED
        Expected 4 to be 3.
    Error: Expected 4 to be 3.
        at null.<anonymous> (/Users/andy/code/angular.js/test/ngMock/angular-mocksSpec.js:58:29)
    Expected 1 to be 0.
    Error: Expected 1 to be 0.
        at null.<anonymous> (/Users/andy/code/angular.js/test/ngMock/angular-mocksSpec.js:62:29)
    Expected 22 to match 21.
    Error: Expected 22 to match 21.
        at null.<anonymous> (/Users/andy/code/angular.js/test/ngMock/angular-mocksSpec.js:66:29)
Chrome 28.0.1500 (Mac OS X 10.8.4): Executed 2208 of 2208 (1 FAILED) (6.69 secs / 6.056 secs)

@AndyHitchman
Copy link
Contributor Author

Contributor signed CLA now or in the past

  • If you just signed, leave a comment here with your real name

I have just signed CLA. Name is Andrew Hitchman.

@pkozlowski-opensource
Copy link
Member

@AndyHitchman I'm afraid that we can't find you CLA signature... Could you please verify and provide the exact name / e-mail you've used to sign-in the CLA? Thnx!

@AndyHitchman
Copy link
Contributor Author

Resigned CLA with name Andrew Hitchman and email andy at hitchman dot net

@IgorMinar
Copy link
Contributor

CLA verified

@IgorMinar IgorMinar closed this in f80730f Aug 9, 2013
IgorMinar pushed a commit that referenced this pull request Aug 9, 2013
angular.copy previously copied RegExp as an empty object. Change detects
RegExp instance and clones into new RegExp. This change is based on a previous
fix to allow Date to be copied.

Closes #3473
Closes #3474
@kamrul-islam
Copy link

Hi,

I tried to run unit test on g3_v1_x branch but it failed due to similar issue. Can you please help?
My trace is like that

Chrome 29.0.1547 (Mac OS X 10.8.4) ngMock TzDate should fake getHours method FAILED
Expected 4 to be 3.
Error: Expected 4 to be 3.
at null. (/Users//angular.js/test/ngMock/angular-mocksSpec.js:58:29)
Expected 1 to be 0.
Error: Expected 1 to be 0.
at null. (/Users//angular.js/test/ngMock/angular-mocksSpec.js:62:29)
Expected 22 to match 21.
Error: Expected 22 to match 21.
at null. (/Users//angular.js/test/ngMock/angular-mocksSpec.js:66:29)
Chrome 29.0.1547 (Mac OS X 10.8.4): Executed 2244 of 2244 (1 FAILED) (10.744 secs / 9.411 secs)
Warning: Karma test(s) failed. Exit code: 1 Use --force to continue.

Aborted due to warnings.

@IgorMinar
Copy link
Contributor

What time zone are you in?

@kamrul-islam
Copy link

Hi,

I am in Australia/Melbourne (UTC/GMT +10 hours).

Thanks

On 26/08/2013, at 1:38 PM, Igor Minar [email protected] wrote:

What time zone are you in?


Reply to this email directly or view it on GitHub.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

angular.copy does not correctly duplicate RegExp
5 participants