Skip to content

prime? openssl error in 9.1.5.0 #4193

@jzakiya

Description

@jzakiya

Environment

$ jruby -v
jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 Java HotSpot(TM) 64-Bit Server VM 25.102-b14 on 1.8.0_102-b14 +jit [linux-x86_64]

$ uname -a
Linux localhost 4.7.5-pclos1 #1 SMP Sun Sep 25 17:05:47 CDT 2016 x86_64 x86_64 x86_64 GNU/Linux

Expected Behavior

> require 'openssl'
> 5.to_bn.prime?
 => true
> -5.to_bn.prime?
 => false

Actual Behavior

> require 'openssl'
> 5.to_bn.prime?
 => true
> -5.to_bn.prime?     
 => true                  -- should be false, this is an error for all negative primes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions