Skip to content

Commit 9bf58b8

Browse files
committed
version fix for M2
1 parent ab712c7 commit 9bf58b8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/sage/interfaces/macaulay2.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -656,16 +656,14 @@ def cputime(self, t=None):
656656

657657
def version(self):
658658
"""
659-
Returns the version of Macaulay2.
659+
Return the version of Macaulay2 as a tuple.
660660
661661
EXAMPLES::
662662
663663
sage: macaulay2.version() # optional - macaulay2
664-
(1, 1...
664+
(1, ...)
665665
"""
666-
s = self.eval("version")
667-
r = re.compile("VERSION => (.*?)\n")
668-
s = r.search(s).groups()[0]
666+
s = self.eval('version#"VERSION"')
669667
return tuple(int(i) for i in s.split("."))
670668

671669
# Constructors

0 commit comments

Comments
 (0)