Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing @autoreleasepool to objective-c at_keywords #1424

Merged
merged 2 commits into from Feb 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rouge/lexers/objective_c/common.rb
Expand Up @@ -10,7 +10,7 @@ def at_keywords
@at_keywords ||= %w(
selector private protected public encode synchronized try
throw catch finally end property synthesize dynamic optional
interface implementation import
interface implementation import autoreleasepool
)
end

Expand Down
4 changes: 4 additions & 0 deletions spec/visual/samples/objective_c
Expand Up @@ -29,6 +29,10 @@

@end

@autoreleasepool {
NSString *string = [[NSString alloc] initWithUTF8String:"I will be autoreleased"];
}

double (^multiplyTwoValues)(double, double) = ^(double firstValue, double secondValue) {
return firstValue * secondValue;
};
Expand Down