Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ext/mini_phone/mini_phone.cc
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,15 @@ extern "C" VALUE rb_phone_number_area_code(VALUE self) {
TypedData_Get_Struct(self, PhoneNumberInfo, &phone_number_info_type, phone_number_info);

PhoneNumber *number = phone_number_info->phone_number;
string national_significant_number;
std::string national_significant_number;
phone_util.GetNationalSignificantNumber(*number, &national_significant_number);
string area_code;
string subscriber_number;
std::string area_code;
std::string subscriber_number;

int area_code_length = phone_util.GetLengthOfGeographicalAreaCode(*number);
if (area_code_length > 0) {
area_code = national_significant_number.substr(0, area_code_length);
subscriber_number = national_significant_number.substr(area_code_length, string::npos);
subscriber_number = national_significant_number.substr(area_code_length, std::string::npos);
} else {
area_code = "";
subscriber_number = national_significant_number;
Expand Down
2 changes: 1 addition & 1 deletion lib/mini_phone/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module MiniPhone
VERSION = '1.1.9'
VERSION = '1.1.10'
end