Skip to content

Commit

Permalink
Fix several bugs in enum_for arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremycole committed Jul 16, 2021
1 parent fa758f1 commit 489f6e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/innodb/data_dictionary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def each_data_dictionary_index
# Iterate through records from a data dictionary index yielding each record
# as a Innodb::Record object.
def each_record_from_data_dictionary_index(table, index, &block)
return enum_for(:each_index, table, index) unless block_given?
return enum_for(:each_record_from_data_dictionary_index, table, index) unless block_given?

data_dictionary_index(table, index).each_record(&block)

Expand Down Expand Up @@ -465,7 +465,7 @@ def each_field_by_index_id(index_id)

# Iterate through all fields in an index by index name.
def each_field_by_index_name(table_name, index_name, &block)
return enum_for(:each_field_by_name, table_name, index_name) unless block_given?
return enum_for(:each_field_by_index_name, table_name, index_name) unless block_given?

index = index_by_name(table_name, index_name)
raise "Index #{index_name} for table #{table_name} not found" unless index
Expand Down
2 changes: 1 addition & 1 deletion lib/innodb/space.rb
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def each_xdes
# Iterate through all pages, yielding the page number, page object,
# and page status.
def each_page_status(start_page = 0)
return enum_for(:each_page_with_status, start_page) unless block_given?
return enum_for(:each_page_status, start_page) unless block_given?

each_xdes do |xdes|
xdes.each_page_status do |page_number, page_status|
Expand Down

0 comments on commit 489f6e7

Please sign in to comment.