krahets / hello-algo

《Hello 算法》:动画图解、一键运行的数据结构与算法教程。支持 Python, Java, C++, C, C#, JS, Go, Swift, Rust, Ruby, Kotlin, TS, Dart 代码。简体版和繁体版同步更新,English version ongoing
https://www.hello-algo.com
Other
95.51k stars 12.12k forks source link

chore: Update Ruby driver code #1265

Closed khoaxuantu closed 5 months ago

khoaxuantu commented 5 months ago

In #1262, we have the binary_search_edge file that import a method of binary_search_insertion file. To prevent the driver code in the binary_search_insertion file being triggered when running the binary_search_edge file, we should put the driver code into this block:

### Driver Code ###
if __FILE__ == $0
  # Your code
end

I create this PR to update the driver code of all the existing Ruby index files at main.