Nope, the enterprise version is _not_
the exact same ruby/chef codebase. See for example this blogpost [1] where they announce LDAP sync. New features are often released on the public Github before they are included into a new github enterprise release.
That being said, the enterprise version is very close to the public version. They are probably branches of the same repositories.
[1] https://github.com/blog/category/enterprise