No commit activity in last 3 years
No release in over 3 years
A fast and simple in-place implementation of the luhn check algorithm in Ruby using a C extension.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 11.2.2
~> 3.2.1
 Project Readme

Luhn (Mod 10)

Build Status

A fast and simple in-place implementation of the luhn check algorithm in Ruby using a C extension. Implementations in other languages can be found at github.com/luhnmod10.

Usage

Install the gem:

gem install luhnmod10-native

Or add to the Gemfile:

gem "luhnmod10-native"

Then:

require "luhnmod10/native"
Luhnmod10::Native.valid?("4242424242424242")

Contributing

Contributions are welcome! If you can improve the execution time of this implementation without increasing its complexity, please open a pull request. To test your change, run make in the repository to run the tests and the benchmarks.